]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Modernize 'cpu-strict' case
authorPeter Krempa <pkrempa@redhat.com>
Fri, 1 Sep 2023 14:18:12 +0000 (16:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 6 Sep 2023 12:09:45 +0000 (14:09 +0200)
Use the fake Haswell processor definition and augment the list of
features to make the test pass.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/cpu-strict1.x86_64-latest.args [moved from tests/qemuxml2argvdata/cpu-strict1.args with 84% similarity]
tests/qemuxml2argvdata/cpu-strict1.xml
tests/qemuxml2argvtest.c

similarity index 84%
rename from tests/qemuxml2argvdata/cpu-strict1.args
rename to tests/qemuxml2argvdata/cpu-strict1.x86_64-latest.args
index 7e33e9dd628155dd9cedd2630c00ba694a4eecfc..3f9c3516bb5f8b8023e322eb0339ddf0b67458d6 100644 (file)
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
 -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
 -accel kvm \
--cpu core2duo,ds=on,acpi=on,ht=on,tm=on,ds-cpl=on,vmx=on,est=on,xtpr=on,3dnowext=on,lahf-lm=on,nx=off,cx16=off,tm2=off,pbe=off,ss=off,sse4a=off,wdt=off \
+-cpu Haswell,ds=on,acpi=on,ht=on,tm=on,ds-cpl=on,vmx=on,est=on,xtpr=on,3dnowext=on,lahf-lm=on,nx=off,cx16=off,tm2=off,pbe=off,ss=off,sse4a=off,wdt=off,vme=off,invtsc=off,abm=off,pdpe1gb=off,rdrand=off,f16c=off,pdcm=off,smx=off,monitor=off,dtes64=off \
 -m size=219136k \
 -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
index f17c75b6aff04befa5933ff0f230a17ebd9adc0e..63db54ecadf7101d1ab26eb3b2a717d0cbd0e984 100644 (file)
@@ -9,7 +9,7 @@
     <boot dev='network'/>
   </os>
   <cpu match='strict'>
-    <model>core2duo</model>
+    <model>Haswell</model>
     <feature name='ds' policy='require'/>
     <feature name='acpi' policy='optional'/>
     <feature name='ht' policy='require'/>
     <feature name='ss' policy='disable'/>
     <feature name='sse4a' policy='optional'/>
     <feature name='wdt' policy='forbid'/>
+    <feature name='vme' policy='disable'/>
+    <feature name='invtsc' policy='disable'/>
+    <feature name='abm' policy='disable'/>
+    <feature name='pdpe1gb' policy='disable'/>
+    <feature name='rdrand' policy='disable'/>
+    <feature name='f16c' policy='disable'/>
+    <feature name='pdcm' policy='disable'/>
+    <feature name='smx' policy='disable'/>
+    <feature name='monitor' policy='disable'/>
+    <feature name='dtes64' policy='disable'/>
   </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
index 7fc564d3ef1fd9c1d3ffeb7fa7b660b6d797d68c..e2af68852973d591d3941d564e389bb1d62ec65f 100644 (file)
@@ -1744,7 +1744,7 @@ mymain(void)
     DO_TEST("cpu-exact2-nofallback", QEMU_CAPS_KVM);
     DO_TEST("cpu-fallback", QEMU_CAPS_KVM);
     DO_TEST_FAILURE("cpu-nofallback", QEMU_CAPS_KVM);
-    DO_TEST("cpu-strict1", QEMU_CAPS_KVM);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-strict1", "x86_64", ARG_CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL);
     DO_TEST("cpu-no-removed-features", QEMU_CAPS_KVM);
     DO_TEST_NOCAPS("cpu-numa1");
     DO_TEST_NOCAPS("cpu-numa2");