From db8ed4fed402071cbc2d1c58ac381dd9658a1f03 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 18 Aug 2021 14:21:45 +0200 Subject: [PATCH] qemuxml2argvtest: Slightly modernize "cpu-host-model" case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch to q35 in anticipation of using DO_TEST_CAPS* in further patches. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- 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 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 219100 - 6 + 1 - hvm - + hvm - + + + destroy restart destroy - /usr/bin/qemu-system-x86_64 + /usr/bin/qemu-system-x86_64 + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 72a3bb5b75..117e310333 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -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);