|
|
fbe740 |
From a620d42d440828f1f978a75c01a9515d0c131721 Mon Sep 17 00:00:00 2001
|
|
|
fbe740 |
Message-Id: <a620d42d440828f1f978a75c01a9515d0c131721@dist-git>
|
|
|
fbe740 |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
|
fbe740 |
Date: Thu, 20 Feb 2020 09:08:04 +0100
|
|
|
fbe740 |
Subject: [PATCH] qemuxml2xmltest: Add case for host-model vendor_id
|
|
|
fbe740 |
MIME-Version: 1.0
|
|
|
fbe740 |
Content-Type: text/plain; charset=UTF-8
|
|
|
fbe740 |
Content-Transfer-Encoding: 8bit
|
|
|
fbe740 |
|
|
|
fbe740 |
This patch shows a bug in our code: the
|
|
|
fbe740 |
|
|
|
fbe740 |
<model vendor_id="Libvirt QEMU"/>
|
|
|
fbe740 |
|
|
|
fbe740 |
element present in the source XML is lost when the parsed CPU definition
|
|
|
fbe740 |
is formatted back to XML.
|
|
|
fbe740 |
|
|
|
fbe740 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804549
|
|
|
fbe740 |
|
|
|
fbe740 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
fbe740 |
(cherry picked from commit 1939fbef989e6990cb5dd2d2d7ff8ea002c517c2)
|
|
|
fbe740 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
fbe740 |
Message-Id: <cef7f3e28619a9fc306f17eddaa6d81df5ce21c2.1582186015.git.jdenemar@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
fbe740 |
---
|
|
|
fbe740 |
.../cpu-host-model-vendor.xml | 28 +++++++++++++++++++
|
|
|
fbe740 |
tests/qemuxml2xmltest.c | 1 +
|
|
|
fbe740 |
2 files changed, 29 insertions(+)
|
|
|
fbe740 |
create mode 100644 tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml
|
|
|
fbe740 |
|
|
|
fbe740 |
diff --git a/tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml b/tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml
|
|
|
fbe740 |
new file mode 100644
|
|
|
fbe740 |
index 0000000000..d2447ccd10
|
|
|
fbe740 |
--- /dev/null
|
|
|
fbe740 |
+++ b/tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml
|
|
|
fbe740 |
@@ -0,0 +1,28 @@
|
|
|
fbe740 |
+<domain type='qemu'>
|
|
|
fbe740 |
+ <name>QEMUGuest1</name>
|
|
|
fbe740 |
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
|
|
fbe740 |
+ <memory unit='KiB'>219100</memory>
|
|
|
fbe740 |
+ <currentMemory unit='KiB'>219100</currentMemory>
|
|
|
fbe740 |
+ <vcpu placement='static'>6</vcpu>
|
|
|
fbe740 |
+ <os>
|
|
|
fbe740 |
+ <type arch='x86_64' machine='pc'>hvm</type>
|
|
|
fbe740 |
+ <boot dev='network'/>
|
|
|
fbe740 |
+ </os>
|
|
|
fbe740 |
+ <cpu mode='host-model' check='partial'/>
|
|
|
fbe740 |
+ <clock offset='utc'/>
|
|
|
fbe740 |
+ <on_poweroff>destroy</on_poweroff>
|
|
|
fbe740 |
+ <on_reboot>restart</on_reboot>
|
|
|
fbe740 |
+ <on_crash>destroy</on_crash>
|
|
|
fbe740 |
+ <devices>
|
|
|
fbe740 |
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
|
|
|
fbe740 |
+ <controller type='usb' index='0'>
|
|
|
fbe740 |
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
|
|
fbe740 |
+ </controller>
|
|
|
fbe740 |
+ <controller type='pci' index='0' model='pci-root'/>
|
|
|
fbe740 |
+ <input type='mouse' bus='ps2'/>
|
|
|
fbe740 |
+ <input type='keyboard' bus='ps2'/>
|
|
|
fbe740 |
+ <memballoon model='virtio'>
|
|
|
fbe740 |
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
|
|
fbe740 |
+ </memballoon>
|
|
|
fbe740 |
+ </devices>
|
|
|
fbe740 |
+</domain>
|
|
|
fbe740 |
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
|
|
|
fbe740 |
index a3c7f8fd47..7c105e5207 100644
|
|
|
fbe740 |
--- a/tests/qemuxml2xmltest.c
|
|
|
fbe740 |
+++ b/tests/qemuxml2xmltest.c
|
|
|
fbe740 |
@@ -266,6 +266,7 @@ mymain(void)
|
|
|
fbe740 |
DO_TEST("cpu-host-kvmclock", NONE);
|
|
|
fbe740 |
DO_TEST("cpu-host-passthrough-features", NONE);
|
|
|
fbe740 |
DO_TEST("cpu-host-model-features", NONE);
|
|
|
fbe740 |
+ DO_TEST("cpu-host-model-vendor", NONE);
|
|
|
fbe740 |
DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
|
|
fbe740 |
DO_TEST("kvmclock", NONE);
|
|
|
fbe740 |
DO_TEST("clock-timer-hyperv-rtc", NONE);
|
|
|
fbe740 |
--
|
|
|
fbe740 |
2.25.0
|
|
|
fbe740 |
|