[libvirt-users] Haswell 4770 misidentified as Sandy Bridge

Hi, I'm running libvert on a Debian 7 system. I have upgraded libvert and qemu from source (v1.06 and 1.5.0 respectively) and the problem persists. The guest OS is also a Debian 7 system running a non-SMP kernel. The error message from virt-manager is Error starting domain: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup self._backend.create() File "/usr/local/lib/python2.7/dist-packages/libvirt.py", line 698, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid but the host /proc/cpuinfo gives the correct flags as processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.91 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: Is there a place in the code I can look where the CPU flags are checked? I did create this VM on the Debian 7 versions of libvirt and qemu, but I don't see that it should be much of a problem since you can swap CPUs in virt-manager. The end goal is to read Sandy Bridge+ RAPL MSRs from the guest OS. perf_events are now being exported, which is great for my work, but if I could read some of those RAPL MSRs, It would make my life orders of magnitude easier. Any help would be much appreciated. Best, Michael Giardino <giardino@ece.gatech.edu> <michael.giardino@gmail.com>

Hi, I'm running libvert on a Debian 7 system. I have upgraded libvert and qemu from source (v1.06 and 1.5.0 respectively) and the problem persists. The guest OS is also a Debian 7 system running a non-SMP kernel. The error message from virt-manager is Error starting domain: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup self._backend.create() File "/usr/local/lib/python2.7/dist-packages/libvirt.py", line 698, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid but the host /proc/cpuinfo gives the correct flags as processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.91 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: Is there a place in the code I can look where the CPU flags are checked? I did create this VM on the Debian 7 versions of libvirt and qemu, but I don't see that it should be much of a problem since you can swap CPUs in virt-manager. The end goal is to read Sandy Bridge+ RAPL MSRs from the guest OS. perf_events are now being exported, which is great for my work, but if I could read some of those RAPL MSRs, It would make my life orders of magnitude easier. Any help would be much appreciated. Best, Michael Giardino <mikelj@gatech.edu> <michael.giardino@gmail.com>

On 06/14/2013 01:41 AM, Michael Giardino wrote:
Hi,
I'm running libvert on a Debian 7 system. I have upgraded libvert and qemu from source (v1.06 and 1.5.0 respectively) and the problem persists. The guest OS is also a Debian 7 system running a non-SMP kernel. The error message from virt-manager is
Error starting domain: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup self._backend.create() File "/usr/local/lib/python2.7/dist-packages/libvirt.py", line 698, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
but the host /proc/cpuinfo gives the correct flags as
processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.91 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management:
Is there a place in the code I can look where the CPU flags are checked? I did create this VM on the Debian 7 versions of libvirt and qemu, but I don't see that it should be much of a problem since you can swap CPUs in virt-manager.
The end goal is to read Sandy Bridge+ RAPL MSRs from the guest OS. perf_events are now being exported, which is great for my work, but if I could read some of those RAPL MSRs, It would make my life orders of magnitude easier.
Any help would be much appreciated.
Just to note - I'm using a Haswell machine myself -- Intel(R) Core(TM) i5-4670T CPU @ 2.30GHz -- without any problems, but that's w/o virt-manager. I use libvirt's virsh-shell/virt-install. Here's my guest xml -- https://github.com/kashyapc/nvmx-haswell/blob/master/tests/libvirt-xmls-for-... Not sure if that answers your specific question. -- /kashyap

On 06/13/2013 10:11 PM, Michael Giardino wrote:
Hi,
I'm running libvert on a Debian 7 system. I have upgraded libvert and qemu from source (v1.06 and 1.5.0 respectively) and the problem persists. The guest OS is also a Debian 7 system running a non-SMP kernel. The error message from virt-manager is
Error starting domain: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup self._backend.create() File "/usr/local/lib/python2.7/dist-packages/libvirt.py", line 698, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
but the host /proc/cpuinfo gives the correct flags as
processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.91 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management:
Is there a place in the code I can look where the CPU flags are checked? I did create this VM on the Debian 7 versions of libvirt and qemu, but I don't see that it should be much of a problem since you can swap CPUs in virt-manager.
The end goal is to read Sandy Bridge+ RAPL MSRs from the guest OS. perf_events are now being exported, which is great for my work, but if I could read some of those RAPL MSRs, It would make my life orders of magnitude easier.
Any help would be much appreciated.
This really looks like a bug, but before saying that for sure, could you dump the whole /proc/cpuinfo for all the cores (cpus)? Or make sure they are really the same? We currently don't support getting cpuid info from all cpus, because we don't control what cpus the cpuid instruction is being ran on. Thanks, Martin

Kashyap: I have not tried integrating your guest xml but I will look over it today when I get a chance. Thank you. Martin: Below is the output from /proc/cpuinfo. Let me know if there is anything else that would be helpful in debugging this. Thank you, Michael Giardino processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 1 cpu cores : 4 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 2 cpu cores : 4 apicid : 4 initial apicid : 4 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 3 cpu cores : 4 apicid : 6 initial apicid : 6 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: processor : 4 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 0 cpu cores : 4 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: processor : 5 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 1 cpu cores : 4 apicid : 3 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: processor : 6 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 2 cpu cores : 4 apicid : 5 initial apicid : 5 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.58 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: Michael Giardino <mikelj@gatech.edu> <michael.giardino@gmail.com> On Mon, Jun 17, 2013 at 3:58 AM, Martin Kletzander <mkletzan@redhat.com>wrote:
On 06/13/2013 10:11 PM, Michael Giardino wrote:
Hi,
I'm running libvert on a Debian 7 system. I have upgraded libvert and qemu from source (v1.06 and 1.5.0 respectively) and the problem persists. The guest OS is also a Debian 7 system running a non-SMP kernel. The error message from virt-manager is
Error starting domain: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup self._backend.create() File "/usr/local/lib/python2.7/dist-packages/libvirt.py", line 698, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, invpcid, erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
but the host /proc/cpuinfo gives the correct flags as
processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x7 cpu MHz : 800.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm bogomips : 6795.91 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management:
Is there a place in the code I can look where the CPU flags are checked? I did create this VM on the Debian 7 versions of libvirt and qemu, but I don't see that it should be much of a problem since you can swap CPUs in virt-manager.
The end goal is to read Sandy Bridge+ RAPL MSRs from the guest OS. perf_events are now being exported, which is great for my work, but if I could read some of those RAPL MSRs, It would make my life orders of magnitude easier.
Any help would be much appreciated.
This really looks like a bug, but before saying that for sure, could you dump the whole /proc/cpuinfo for all the cores (cpus)? Or make sure they are really the same? We currently don't support getting cpuid info from all cpus, because we don't control what cpus the cpuid instruction is being ran on.
Thanks, Martin

On 06/17/2013 05:41 PM, Michael Giardino wrote:
Kashyap: I have not tried integrating your guest xml but I will look over it today when I get a chance. Thank you.
Martin: Below is the output from /proc/cpuinfo. Let me know if there is anything else that would be helpful in debugging this. Thank you,
Unfotunately, my guess was wrong. If you could run 'cpuid -ir1', I'll dig in to that and will identify what we do wrong. Thanks, Martin

I didn't have cpuid installed on my system, but I imagine that libvirt is using the instruction cpuid, not a userspace program. Please let me know if there's anything else I can do to help. Best, Michael eax in eax ebx ecx edx 00000000 0000000d 756e6547 6c65746e 49656e69 00000001 000306c3 01100800 7ffafbff bfebfbff 00000002 76036301 00f0b5ff 00000000 00c10000 00000003 00000000 00000000 00000000 00000000 00000004 00000000 00000000 00000000 00000000 00000005 00000040 00000040 00000003 00042120 00000006 00000077 00000002 00000009 00000000 00000007 00000000 00000000 00000000 00000000 00000008 00000000 00000000 00000000 00000000 00000009 00000000 00000000 00000000 00000000 0000000a 07300403 00000000 00000000 00000603 0000000b 00000000 00000000 0000006f 00000001 0000000c 00000000 00000000 00000000 00000000 0000000d 00000000 00000000 00000000 00000000 80000000 80000008 00000000 00000000 00000000 80000001 00000000 00000000 00000021 2c100800 80000002 65746e49 2952286c 726f4320 4d542865 80000003 37692029 3737342d 50432030 20402055 80000004 30342e33 007a4847 00000000 00000000 80000005 00000000 00000000 00000000 00000000 80000006 00000000 00000000 01006040 00000000 80000007 00000000 00000000 00000000 00000100 80000008 00003027 00000000 00000000 00000000 Vendor ID: "GenuineIntel"; CPUID level 13 Intel-specific functions: Version 000306c3: Type 0 - Original OEM Family 6 - Pentium Pro Model 12 - Stepping 3 Reserved 12 Extended brand string: "Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz" CLFLUSH instruction cache line size: 8 Initial APIC ID: 1 Hyper threading siblings: 16 Feature flags bfebfbff: FPU Floating Point Unit VME Virtual 8086 Mode Enhancements DE Debugging Extensions PSE Page Size Extensions TSC Time Stamp Counter MSR Model Specific Registers PAE Physical Address Extension MCE Machine Check Exception CX8 COMPXCHG8B Instruction APIC On-chip Advanced Programmable Interrupt Controller present and enabled SEP Fast System Call MTRR Memory Type Range Registers PGE PTE Global Flag MCA Machine Check Architecture CMOV Conditional Move and Compare Instructions FGPAT Page Attribute Table PSE-36 36-bit Page Size Extension CLFSH CFLUSH instruction DS Debug store ACPI Thermal Monitor and Clock Ctrl MMX MMX instruction set FXSR Fast FP/MMX Streaming SIMD Extensions save/restore SSE Streaming SIMD Extensions instruction set SSE2 SSE2 extensions SS Self Snoop HT Hyper Threading TM Thermal monitor 31 reserved TLB and cache info: 63: unknown TLB/cache descriptor 03: Data TLB: 4KB pages, 4-way set assoc, 64 entries 76: unknown TLB/cache descriptor ff: unknown TLB/cache descriptor b5: unknown TLB/cache descriptor f0: unknown TLB/cache descriptor c1: unknown TLB/cache descriptor Processor serial: 0003-06C3-0000-0000-0000-0000 Michael Giardino <mikelj@gatech.edu> <michael.giardino@gmail.com> On Tue, Jun 18, 2013 at 5:57 AM, Martin Kletzander <mkletzan@redhat.com>wrote:
On 06/17/2013 05:41 PM, Michael Giardino wrote:
Kashyap: I have not tried integrating your guest xml but I will look over it today when I get a chance. Thank you.
Martin: Below is the output from /proc/cpuinfo. Let me know if there is anything else that would be helpful in debugging this. Thank you,
Unfotunately, my guess was wrong. If you could run 'cpuid -ir1', I'll dig in to that and will identify what we do wrong.
Thanks, Martin

Sorry to blow up everyone's email on this but I tried something new and found a different problem. I uninstalled all the debian package (libvirt, kvm, qemu, virt-manager, etc.) and then remade all the packages and installed them. Haswell again shows up in virt-manager, but now any CPU I choose including kvm64 and qemu64 give the same error: root@mal:~# virsh create /etc/libvirt/qemu/debian7-nonsmp.xml 2013-06-19 03:09:42.836+0000: 24248: info : libvirt version: 1.0.6 2013-06-19 03:09:42.836+0000: 24248: warning : virLogParseDefaultPriority:1581 : Ignoring invalid log level setting error: Failed to create domain from /etc/libvirt/qemu/debian7-nonsmp.xml error: internal error Cannot find suitable CPU model for given data This is using the old "working" xml configuration. I then let virt-manager create a new one by installing a new VM using the qcow2 image from before. If I use the new one created by virt-manager I get the same error. The only major difference I see in the two xmls is <os> <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type> <boot dev='hd'/> </os> in the new one compared to the old one below. I'm starting to think I've hosed the whole thing and need to delete everything, remove with configuration files, and start over. old, "working" xml <!-- WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE OVERWRITTEN AND LOST. Changes to this xml configuration should be made using: virsh edit debian7-nonsmp or other application using the libvirt API. --> <domain type='kvm'> <name>debian7-nonsmp</name> <uuid>b439131a-cf33-26c2-378e-0e9cb65f2e51</uuid> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static' cpuset='6-7'>2</vcpu> <os> <type arch='x86_64' machine='pc-1.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Haswell</model> <vendor>Intel</vendor> <feature policy='require' name='monitor'/> <feature policy='require' name='tm2'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='osxsave'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='abm'/> <feature policy='require' name='ht'/> <feature policy='require' name='ds'/> <feature policy='require' name='pbe'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='movbe'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='fma'/> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/srv/kvm/debian7-nonsmp-fry.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='bridge'> <mac address='52:54:00:85:f9:39'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> </domain> Michael Giardino <mikelj@gatech.edu> <michael.giardino@gmail.com> On Tue, Jun 18, 2013 at 9:32 AM, Michael Giardino <mikelj@gatech.edu> wrote:
I didn't have cpuid installed on my system, but I imagine that libvirt is using the instruction cpuid, not a userspace program.
Please let me know if there's anything else I can do to help.
Best, Michael
eax in eax ebx ecx edx 00000000 0000000d 756e6547 6c65746e 49656e69 00000001 000306c3 01100800 7ffafbff bfebfbff 00000002 76036301 00f0b5ff 00000000 00c10000 00000003 00000000 00000000 00000000 00000000 00000004 00000000 00000000 00000000 00000000 00000005 00000040 00000040 00000003 00042120 00000006 00000077 00000002 00000009 00000000 00000007 00000000 00000000 00000000 00000000 00000008 00000000 00000000 00000000 00000000 00000009 00000000 00000000 00000000 00000000 0000000a 07300403 00000000 00000000 00000603 0000000b 00000000 00000000 0000006f 00000001 0000000c 00000000 00000000 00000000 00000000 0000000d 00000000 00000000 00000000 00000000 80000000 80000008 00000000 00000000 00000000 80000001 00000000 00000000 00000021 2c100800 80000002 65746e49 2952286c 726f4320 4d542865 80000003 37692029 3737342d 50432030 20402055 80000004 30342e33 007a4847 00000000 00000000 80000005 00000000 00000000 00000000 00000000 80000006 00000000 00000000 01006040 00000000 80000007 00000000 00000000 00000000 00000100 80000008 00003027 00000000 00000000 00000000
Vendor ID: "GenuineIntel"; CPUID level 13
Intel-specific functions: Version 000306c3: Type 0 - Original OEM Family 6 - Pentium Pro Model 12 - Stepping 3 Reserved 12
Extended brand string: "Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz" CLFLUSH instruction cache line size: 8 Initial APIC ID: 1 Hyper threading siblings: 16
Feature flags bfebfbff: FPU Floating Point Unit VME Virtual 8086 Mode Enhancements DE Debugging Extensions PSE Page Size Extensions TSC Time Stamp Counter MSR Model Specific Registers PAE Physical Address Extension MCE Machine Check Exception CX8 COMPXCHG8B Instruction APIC On-chip Advanced Programmable Interrupt Controller present and enabled SEP Fast System Call MTRR Memory Type Range Registers PGE PTE Global Flag MCA Machine Check Architecture CMOV Conditional Move and Compare Instructions FGPAT Page Attribute Table PSE-36 36-bit Page Size Extension CLFSH CFLUSH instruction DS Debug store ACPI Thermal Monitor and Clock Ctrl MMX MMX instruction set FXSR Fast FP/MMX Streaming SIMD Extensions save/restore SSE Streaming SIMD Extensions instruction set SSE2 SSE2 extensions SS Self Snoop HT Hyper Threading TM Thermal monitor 31 reserved
TLB and cache info: 63: unknown TLB/cache descriptor 03: Data TLB: 4KB pages, 4-way set assoc, 64 entries 76: unknown TLB/cache descriptor ff: unknown TLB/cache descriptor b5: unknown TLB/cache descriptor f0: unknown TLB/cache descriptor c1: unknown TLB/cache descriptor Processor serial: 0003-06C3-0000-0000-0000-0000
Michael Giardino <mikelj@gatech.edu> <michael.giardino@gmail.com>
On Tue, Jun 18, 2013 at 5:57 AM, Martin Kletzander <mkletzan@redhat.com>wrote:
On 06/17/2013 05:41 PM, Michael Giardino wrote:
Kashyap: I have not tried integrating your guest xml but I will look over it today when I get a chance. Thank you.
Martin: Below is the output from /proc/cpuinfo. Let me know if there is anything else that would be helpful in debugging this. Thank you,
Unfotunately, my guess was wrong. If you could run 'cpuid -ir1', I'll dig in to that and will identify what we do wrong.
Thanks, Martin

On 06/19/2013 05:32 AM, Michael Giardino wrote:
Sorry to blow up everyone's email on this but I tried something new and found a different problem. I uninstalled all the debian package (libvirt, kvm, qemu, virt-manager, etc.) and then remade all the packages and installed them. Haswell again shows up in virt-manager, but now any CPU I choose including kvm64 and qemu64 give the same error:
root@mal:~# virsh create /etc/libvirt/qemu/debian7-nonsmp.xml 2013-06-19 03:09:42.836+0000: 24248: info : libvirt version: 1.0.6 2013-06-19 03:09:42.836+0000: 24248: warning : virLogParseDefaultPriority:1581 : Ignoring invalid log level setting error: Failed to create domain from /etc/libvirt/qemu/debian7-nonsmp.xml error: internal error Cannot find suitable CPU model for given data
I guess you probably wanted to show that old, "working", domain cannot be defined, but I can't leave following not mentioned. If the machine is defined in /etc/libvirt already, it is loaded upon libvirtd startup, you shouldn't use those files directly, but instead of that use 'virsh start <domain>'
This is using the old "working" xml configuration. I then let virt-manager create a new one by installing a new VM using the qcow2 image from before. If I use the new one created by virt-manager I get the same error. The only major difference I see in the two xmls is
<os> <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type> <boot dev='hd'/> </os>
This has nothing to do with the CPU model, the reason this is different is that by default the newest machine type is selected to incorporate newest qemu features & settings which we simply cannot explain to end user.
in the new one compared to the old one below.
I'm starting to think I've hosed the whole thing and need to delete everything, remove with configuration files, and start over.
I'll check that flags for you, but in the meantime, is there a possibility that /etc/libvirt/cpu_map.xml is somehow screwed up in Debian packaging? [...]
eax in eax ebx ecx edx 00000000 0000000d 756e6547 6c65746e 49656e69 00000001 000306c3 01100800 7ffafbff bfebfbff 00000002 76036301 00f0b5ff 00000000 00c10000 00000003 00000000 00000000 00000000 00000000 00000004 00000000 00000000 00000000 00000000 00000005 00000040 00000040 00000003 00042120 00000006 00000077 00000002 00000009 00000000 00000007 00000000 00000000 00000000 00000000
From the looks of it, I'd guess both libvirt and cpuid are misdetecting Intel instructions like invpcid etc. The cpuid program doesn't clean ecx, but we do clear e[bcd]x registers before calling cpuid.
I'm looking into kernel flag detection to see how they do it (since it is visible in /proc/cpuinfo), because I can't see any other reason why this should fail. Could you create a bug for this issue in the meantime? Thanks, Martin

On 06/19/2013 05:32 AM, Michael Giardino wrote:
Sorry to blow up everyone's email on this but I tried something new and found a different problem. I uninstalled all the debian package (libvirt, kvm, qemu, virt-manager, etc.) and then remade all the packages and installed them. Haswell again shows up in virt-manager, but now any CPU I choose including kvm64 and qemu64 give the same error:
I chased down a person with Haswell CPU and I can't confirm the bug. The detection works perfectly, domain with Haswell is startable and there is no such error. Could you try running these two more commands? virsh capabilities # To see how libvirt identifies your CPU virsh uri # To see where you are connecting and how Aren't there any patches in the debian packaging which would differ the package from upstream? Thanks, Martin
participants (4)
-
Kashyap Chamarthy
-
Martin Kletzander
-
Michael Giardino
-
Michael Giardino