]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Slightly modernize "cpu-host-model" case
authorPeter Krempa <pkrempa@redhat.com>
Wed, 18 Aug 2021 12:21:45 +0000 (14:21 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Aug 2021 08:33:38 +0000 (10:33 +0200)
Switch to q35 in anticipation of using DO_TEST_CAPS* in further patches.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/cpu-host-model.args
tests/qemuxml2argvdata/cpu-host-model.xml
tests/qemuxml2argvtest.c

index 651952d7fb60ab9044a88e08578ceede48f52c0e..f4511fef8383fd010e1692229d9a80b5ab03ea3a 100644 (file)
@@ -10,11 +10,11 @@ QEMU_AUDIO_DRV=none \
 /usr/bin/qemu-system-x86_64 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-machine q35,accel=kvm,usb=off,dump-guest-core=off \
 -cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,+lahf_lm \
 -m 214 \
 -realtime mlock=off \
--smp 6,sockets=6,cores=1,threads=1 \
+-smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
 -no-user-config \
@@ -24,6 +24,12 @@ QEMU_AUDIO_DRV=none \
 -rtc base=utc \
 -no-shutdown \
 -no-acpi \
--usb \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
+-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
+-device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
+-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d \
+-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
+-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \
 -msg timestamp=on
index 21697eda0fb495e50a3b511ca1a3a2c3e485817d..29ea4e3e688ca34a9b3c6b505ea2cca41019e386 100644 (file)
@@ -1,19 +1,21 @@
-<domain type='qemu'>
+<domain type='kvm'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219100</memory>
   <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>6</vcpu>
+  <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='network'/>
+    <type arch='x86_64' machine='q35'>hvm</type>
   </os>
-  <cpu mode='host-model'/>
+  <cpu mode='host-model'>
+    <model fallback='allow'/>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-      <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
   </devices>
 </domain>
index 72a3bb5b7506f9861a2ef634740ae62f025e7ce7..117e310333149e25baafc2e09532ebe550077fa2 100644 (file)
@@ -2071,7 +2071,12 @@ mymain(void)
     DO_TEST_FAILURE("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_RAM);
     DO_TEST_PARSE_ERROR_NOCAPS("cpu-numa-memshared-1");
     DO_TEST("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_FILE);
-    DO_TEST_NOCAPS("cpu-host-model");
+    DO_TEST("cpu-host-model",
+            QEMU_CAPS_DEVICE_PCI_BRIDGE,
+            QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
+            QEMU_CAPS_DEVICE_IOH3420,
+            QEMU_CAPS_ICH9_AHCI,
+            QEMU_CAPS_ICH9_USB_EHCI1);
     DO_TEST_NOCAPS("cpu-host-model-vendor");
     DO_TEST_FULL("cpu-host-model-fallback", "",
                  ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS, ARG_END);