[libvirt] [PATCH 2/2] tests: add tests for kvm-hint-dedicated feature

Menno Lageman menno.lageman at oracle.com
Fri Aug 9 15:19:17 UTC 2019


From: Wim ten Have <wim.ten.have at oracle.com>

Update the KVM feature tests for QEMU's kvm-hint-dedicated
performance hint.

Signed-off-by: Wim ten Have <wim.ten.have at oracle.com>
Signed-off-by: Menno Lageman <menno.lageman at oracle.com>
---
 tests/qemuxml2argvdata/kvm-features-off.xml   | 1 +
 tests/qemuxml2argvdata/kvm-features.args      | 4 ++--
 tests/qemuxml2argvdata/kvm-features.xml       | 4 +++-
 tests/qemuxml2xmloutdata/kvm-features-off.xml | 1 +
 tests/qemuxml2xmloutdata/kvm-features.xml     | 4 +++-
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/qemuxml2argvdata/kvm-features-off.xml b/tests/qemuxml2argvdata/kvm-features-off.xml
index e893f9343754..ab2c16202c3d 100644
--- a/tests/qemuxml2argvdata/kvm-features-off.xml
+++ b/tests/qemuxml2argvdata/kvm-features-off.xml
@@ -12,6 +12,7 @@
     <acpi/>
     <kvm>
       <hidden state='off'/>
+      <hint-dedicated state='off'/>
     </kvm>
   </features>
   <clock offset='utc'/>
diff --git a/tests/qemuxml2argvdata/kvm-features.args b/tests/qemuxml2argvdata/kvm-features.args
index 55d2b8be02ea..8372ca897d8d 100644
--- a/tests/qemuxml2argvdata/kvm-features.args
+++ b/tests/qemuxml2argvdata/kvm-features.args
@@ -10,8 +10,8 @@ QEMU_AUDIO_DRV=none \
 /usr/bin/qemu-system-i686 \
 -name QEMUGuest1 \
 -S \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
--cpu qemu32,kvm=off \
+-machine pc,accel=kvm,usb=off,dump-guest-core=off \
+-cpu host,kvm=off,kvm-hint-dedicated=on \
 -m 214 \
 -realtime mlock=off \
 -smp 6,sockets=6,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/kvm-features.xml b/tests/qemuxml2argvdata/kvm-features.xml
index 68bdee42bacf..b942e89a9280 100644
--- a/tests/qemuxml2argvdata/kvm-features.xml
+++ b/tests/qemuxml2argvdata/kvm-features.xml
@@ -1,4 +1,4 @@
-<domain type='qemu'>
+<domain type='kvm'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219100</memory>
@@ -12,8 +12,10 @@
     <acpi/>
     <kvm>
       <hidden state='on'/>
+      <hint-dedicated state='on'/>
     </kvm>
   </features>
+  <cpu mode='host-passthrough' check='none'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/kvm-features-off.xml b/tests/qemuxml2xmloutdata/kvm-features-off.xml
index b355061c5b01..a0ef9c7e9e15 100644
--- a/tests/qemuxml2xmloutdata/kvm-features-off.xml
+++ b/tests/qemuxml2xmloutdata/kvm-features-off.xml
@@ -12,6 +12,7 @@
     <acpi/>
     <kvm>
       <hidden state='off'/>
+      <hint-dedicated state='off'/>
     </kvm>
   </features>
   <clock offset='utc'/>
diff --git a/tests/qemuxml2xmloutdata/kvm-features.xml b/tests/qemuxml2xmloutdata/kvm-features.xml
index 544b9d860755..b6f16ced1dab 100644
--- a/tests/qemuxml2xmloutdata/kvm-features.xml
+++ b/tests/qemuxml2xmloutdata/kvm-features.xml
@@ -1,4 +1,4 @@
-<domain type='qemu'>
+<domain type='kvm'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219100</memory>
@@ -12,8 +12,10 @@
     <acpi/>
     <kvm>
       <hidden state='on'/>
+      <hint-dedicated state='on'/>
     </kvm>
   </features>
+  <cpu mode='host-passthrough' check='none'/>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
-- 
2.21.0




More information about the libvir-list mailing list