Ticket #10792 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 years ago

cpu instruction CMPXCHG16B is disable

Reported by: airychkov Owned by:
Priority: major Component: other
Version: VirtualBox 4.1.18 Keywords:
Cc: Guest type: Linux
Host type: Windows


cpu instruction CMPXCHG16B is disable need for special software

Change History

comment:1 Changed 4 years ago by Hachiman

Could you please attach the log?

comment:2 Changed 4 years ago by ramshankar

Which special software are you talking about?

comment:3 Changed 4 years ago by thebug

We're having the same issue with our main application. I could attach a logfile but it will not show you anything as we check the cx16 flag of the cpu properties, and complain if it is not set. We use a linux kernel as a base and in /proc/cpuinfo this flag is not set, although the real cpu we're running on supports the instruction (the application runs fine with just the linux kernel without any virtualization).

I can imagine that more applications are having a problem with this. Notice that KVM and VMware do support te instruction, so we can run on these platforms. We need this instruction for performance reasons, simulating it by using a mutex is out of the question so this is a major issue for us.

comment:4 Changed 4 years ago by ShaXbee

Quick answer: Set flag VBoxInternal/CPUM/CMPXCHG16B to true via

VBoxManage setextradata [vmname] VBoxInternal/CPUM/CMPXCHG16B 1

After searching for root cause I found out that problem is caused by bug in CPUM.cpp:

    /** @cfgm{/CPUM/CMPXCHG16B, boolean, false}
     * Expose CMPXCHG16B to the guest if supported by the host.
    bool fCmpXchg16b;
    rc = CFGMR3QueryBoolDef(pCpumCfg, "CMPXCHG16B", &fCmpXchg16b, false); AssertRCReturn(rc, rc);


    | (fCmpXchg16b ? X86_CPUID_FEATURE_ECX_CX16 : 0)

Comment suggests that flag will be true if host CPU supports instruction but default value is false.

comment:5 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to duplicate

I will mark this as duplicate of #11899.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use