Description of problem: Dear Maintainer, after upgrading libvirt-daemon from 1.3.5-1 to 2.0.0-1 I am unable to start a virtual machine which is configured with <cpu mode='host-model'>. With libvirt-daemon 1.3.5-1 this worked just fine. Now you receive an error like that one below when turning a machine (which was live migrated to the updated host) off and on again. Starting the same machine with these settings works as expected: <cpu mode='custom' match='exact'> <model fallback='allow'>Haswell-noTSX</model> </cpu> I think that this patch is causing the error for our CPUs (see below): http://libvirt.org/git/?p=libvirt.git;a=commit;h=f294b83ee632a6330f3a3045fbb5bcb9d9951c03 Does the E5-2630 really support CMT? Since I can't find any specific information for this (it's missing here: http://www.intel.de/content/www/de/de/communications/cache-monitoring-cache-allocation-technologies.html) it's hard to guess if it is a problem with the patch or with the system - maybe we have to enable CMT here somehow? As far as I understand this topic (http://www.spinics.net/linux/fedora/libvir/msg132822.html) this error is by design but shouldn't be the "mode='host-model'" support dropped since it cause errors? Maybe someone can explain this here :-) Commenting this out in /usr/share/libvirt/cpu_map.xml solves the issue as a workaround: <!-- <feature name='cmt'> <cpuid eax_in='0x07' ebx='0x00001000'/> </feature> --> Best Regards, Ansgar Version-Release number of selected component (if applicable): 2.0.0-1 How reproducible: 100% Steps to Reproduce: 1. Create a virtual machine with this CPU configuration: <domain type='kvm'> <name>foobar</name> <uuid>05a431db-0927-4ce2-8fb9-2830c962fa2d</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='host-model'> <model fallback='allow'/> </cpu> [...] 2. Start virtual machine Actual results: Start fails with this error: "qemu-system-x86_64: CPU feature cmt not found" Expected results: Virtual machine should start without errors Additional info: cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz stepping : 2 microcode : 0x27 cpu MHz : 1200.000 cache size : 20480 KB physical id : 0 siblings : 16 core id : 0 cpu cores : 8 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 15 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 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts bugs : bogomips : 4799.73 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management:
Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2016-August/msg00486.html
This bug is now fixed in libvirt.git by commit dbb14bb0f1316d92c89541fca816c91dce0dc8fb Refs: v2.1.0-108-gdbb14bb Author: Jiri Denemark <jdenemar> AuthorDate: Tue Jun 28 10:51:41 2016 +0200 Commit: Jiri Denemark <jdenemar> CommitDate: Wed Aug 10 14:25:24 2016 +0200 cpu_x86: Introduce x86FeatureIsMigratable Signed-off-by: Jiri Denemark <jdenemar> --- src/cpu/cpu_x86.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 1ac897a15da11d1bfca2642bce3b0beaad32bcf1 Refs: v2.1.0-109-g1ac897a Author: Jiri Denemark <jdenemar> AuthorDate: Tue Jun 28 11:12:41 2016 +0200 Commit: Jiri Denemark <jdenemar> CommitDate: Wed Aug 10 14:25:24 2016 +0200 cpu_x86: Properly drop non-migratable features By removing a non-migratable feature in a for loop we would fail to drop every second non-migratable feature if the features array contained several of them in a row. Signed-off-by: Jiri Denemark <jdenemar> --- src/cpu/cpu_x86.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 58ba240df89a7dd7bff16ebb65d9aadd49fb8bbb Refs: v2.1.0-110-g58ba240 Author: Jiri Denemark <jdenemar> AuthorDate: Tue Aug 9 15:03:20 2016 +0200 Commit: Jiri Denemark <jdenemar> CommitDate: Wed Aug 10 14:25:24 2016 +0200 tests: Add a test for host-model CPU with CMT feature The generated command line wouldn't work since QEMU doesn't know what 'cmt' is. The following patch will fix this issue. https://bugzilla.redhat.com/show_bug.cgi?id=1355857 Signed-off-by: Jiri Denemark <jdenemar> --- tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-cmt.args | 22 ++++++++++++++++++++++ tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-cmt.xml | 19 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + tests/testutilsqemu.c | 1 + 4 files changed, 43 insertions(+) commit 300f668c665f1ec0f834917fe8a58b5991322441 Refs: v2.1.0-111-g300f668 Author: Jiri Denemark <jdenemar> AuthorDate: Tue Aug 9 15:15:20 2016 +0200 Commit: Jiri Denemark <jdenemar> CommitDate: Wed Aug 10 14:25:24 2016 +0200 cpu_x86: Fix host-model CPUs on hosts with CMT Since the introduction of CMT features (commit v1.3.5-461-gf294b83) starting a domain with host-model CPU on a host which supports CMT fails because QEMU complains about unknown 'cmt' feature: qemu-system-x86_64: CPU feature cmt not found https://bugzilla.redhat.com/show_bug.cgi?id=1355857 Signed-off-by: Jiri Denemark <jdenemar> --- src/cpu/cpu_x86.c | 8 ++++++-- tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-cmt.args | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)