[libvirt] [PATCH 1/8] tests: Simplify Intel IOMMU testing

Andrea Bolognani abologna at redhat.com
Mon May 20 11:37:46 UTC 2019


Remove a bunch of irrelevant devices and make sure all input
files explicitly opt out of USB controllers: the latter change
will help later, when we start using DO_TEST_CAPS_LATEST().

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 .../intel-iommu-caching-mode.args             |  9 +-------
 .../intel-iommu-caching-mode.xml              | 23 +------------------
 .../intel-iommu-device-iotlb.xml              |  1 +
 tests/qemuxml2argvdata/intel-iommu-eim.xml    |  1 +
 .../qemuxml2argvdata/intel-iommu-machine.xml  |  1 +
 tests/qemuxml2argvdata/intel-iommu.xml        |  1 +
 6 files changed, 6 insertions(+), 30 deletions(-)

diff --git a/tests/qemuxml2argvdata/intel-iommu-caching-mode.args b/tests/qemuxml2argvdata/intel-iommu-caching-mode.args
index a6d25c59fb..1d1f35a38d 100644
--- a/tests/qemuxml2argvdata/intel-iommu-caching-mode.args
+++ b/tests/qemuxml2argvdata/intel-iommu-caching-mode.args
@@ -24,11 +24,4 @@ server,nowait \
 -rtc base=utc \
 -no-shutdown \
 -no-acpi \
--device intel-iommu,intremap=on,caching-mode=on \
--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=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
--device ich9-usb-ehci1,id=usb,bus=pci.2,addr=0x2.0x7 \
--netdev user,id=hostnet0 \
--device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:ab:0c:5c,bus=pci.2,\
-addr=0x1
+-device intel-iommu,intremap=on,caching-mode=on
diff --git a/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml b/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml
index 36a392403b..23e3702cda 100644
--- a/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml
@@ -18,31 +18,10 @@
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
-      <model name='i82801b11-bridge'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
-    </controller>
-    <controller type='pci' index='2' model='pci-bridge'>
-      <model name='pci-bridge'/>
-      <target chassisNr='2'/>
-      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
-    </controller>
-    <controller type='pci' index='3' model='pcie-root-port'>
-      <model name='ioh3420'/>
-      <target chassis='3' port='0x10'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </controller>
+    <controller type='usb' index='0' model='none'/>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
     </controller>
-    <controller type='usb' index='0' model='ich9-ehci1'>
-      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
-    </controller>
-    <interface type='user'>
-      <mac address='52:54:00:ab:0c:5c'/>
-      <model type='rtl8139'/>
-      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
-    </interface>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml
index 3eb08ab9af..fe365eedc8 100644
--- a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml
@@ -18,6 +18,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='usb' index='0' model='none'/>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
     </controller>
diff --git a/tests/qemuxml2argvdata/intel-iommu-eim.xml b/tests/qemuxml2argvdata/intel-iommu-eim.xml
index 8642ed3499..9770f77383 100644
--- a/tests/qemuxml2argvdata/intel-iommu-eim.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-eim.xml
@@ -18,6 +18,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='usb' index='0' model='none'/>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
     </controller>
diff --git a/tests/qemuxml2argvdata/intel-iommu-machine.xml b/tests/qemuxml2argvdata/intel-iommu-machine.xml
index 0961e4288d..90aba16156 100644
--- a/tests/qemuxml2argvdata/intel-iommu-machine.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-machine.xml
@@ -15,6 +15,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='usb' index='0' model='none'/>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
     </controller>
diff --git a/tests/qemuxml2argvdata/intel-iommu.xml b/tests/qemuxml2argvdata/intel-iommu.xml
index 0961e4288d..90aba16156 100644
--- a/tests/qemuxml2argvdata/intel-iommu.xml
+++ b/tests/qemuxml2argvdata/intel-iommu.xml
@@ -15,6 +15,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='usb' index='0' model='none'/>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
     </controller>
-- 
2.21.0




More information about the libvir-list mailing list