[PATCH 3/6] qemuxml2argvtest: Slightly modernize "cpu-host-model" case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Switch to q35 in anticipation of using DO_TEST_CAPS* in further patches.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemuxml2argvdata/cpu-host-model.args | 14 ++++++++++----
 tests/qemuxml2argvdata/cpu-host-model.xml  | 14 ++++++++------
 tests/qemuxml2argvtest.c                   |  7 ++++++-
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/tests/qemuxml2argvdata/cpu-host-model.args b/tests/qemuxml2argvdata/cpu-host-model.args
index 651952d7fb..f4511fef83 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.args
@@ -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
diff --git a/tests/qemuxml2argvdata/cpu-host-model.xml b/tests/qemuxml2argvdata/cpu-host-model.xml
index 21697eda0f..29ea4e3e68 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.xml
+++ b/tests/qemuxml2argvdata/cpu-host-model.xml
@@ -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>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 4e7d1da216..aa3da0ef93 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2077,7 +2077,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);
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux