How to set CPU EDX register in libvirt / qemu?

0

I need to set the CPU EDX register in libvirt as per: https://support.microsoft.com/en-gb/help/2902739/stop-error-0x109-critical-structure-corruption-on-a-vmware-virtual-mac however I cannot find an option for either libvirt vm xml or in the file at /usr/share/libvirt/cpu_map.xml

Any help is appreciated.

Ben

Posted 2017-11-13T16:20:27.307

Reputation: 31

I sincerely doubt that you need to set the EDX register. The fix described on that web page is specific to VMware running on Windows. It has nothing to do with qemu. – Jamie Hanrahan – 2017-11-14T03:00:31.053

Well, it certainly seems to throw the same BSOD error as that fix specified. Weird – Ben – 2017-11-14T12:51:50.500

Ok, but CRITICAL_STRUCTURE_CORRUPTION could refer to any of about a thousand different data structures. It isn't specific to virtual machine environments either. If you'll review https://en.wikipedia.org/wiki/CPUID#EAX.3D80000001h:_Extended_Processor_Info_and_Feature_Bits , you'll see that (assuming typical bit order) that procedure is forcing the CPUID seen by the guest OSs to report that the RDTSCP instruction (read time stamp counter and processor ID) is not available. Unless you have reason to think your BSOD has something to do with that instruction then the fix described doesn't apply.

– Jamie Hanrahan – 2017-11-15T01:17:51.427

Answers

0

Even if you are seeing the same blue screen error message, I'm pretty sceptical that the fix described WRT VMWare applies to KVM. The support article is talking about a specific bug in a specific version of VMWare, which is not likely to be present in KVM. More likely is that there's a different problem causing the same end result.

None the less, if you really do want to try it, IIUC, the VMware value ----:0---:----:----:----:----:----:---- appears to be a binary string for the EDX register value. This corresponds to hex code 0x8000000. According to the libvirt CPU ID mapping database, this should be referring to the rdtscp feature

<feature name='rdtscp'>
  <cpuid eax_in='0x80000001' edx='0x08000000'/>
</feature>

Whether you have this feature enabled for your guest or not depends on whether you have any <cpu> model configured in your guest XML. Assuming you do have a CPU model configured, you can disable this feature thus:

<cpu>
   ...
   <feature name="rdtscp" policy="disable"/>
   ... 
</cpu>

For further info see https://libvirt.org/formatdomain.html#elementsCPU

DanielB

Posted 2017-11-13T16:20:27.307

Reputation: 221