]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemustatusxml2xmltest: Add test data for testing '<origstates>' of PCI hostdev
authorPeter Krempa <pkrempa@redhat.com>
Thu, 2 Feb 2023 14:54:09 +0000 (15:54 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 6 Feb 2023 08:14:00 +0000 (09:14 +0100)
The <origstates> XML element captures private data of a PCI device
needed to restore it after a VM is started. Unfortunately at the point
when it was added we didn't yet have the existing private data
infrastructure.

Since the element is parsed only in cases similar to the status XML we
need to test it there.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
tests/qemustatusxml2xmldata/modern-in.xml

index f5beab722b265219fea1f8d7eec61c822db38758..cdab1d71782bb1c5146895c15eca4e9642c2151e 100644 (file)
         <alias name='hostdev0'/>
         <address type='drive' controller='0' bus='0' target='2' unit='4'/>
       </hostdev>
+      <hostdev mode='subsystem' type='pci' managed='yes'>
+        <driver name='vfio'/>
+        <source>
+          <address domain='0x0005' bus='0x90' slot='0x01' function='0x2'/>
+          <origstates>
+            <unbind/>
+            <removeslot/>
+            <reprobe/>
+          </origstates>
+        </source>
+        <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+      </hostdev>
       <redirdev bus='usb' type='spicevmc'>
         <alias name='redir0'/>
         <address type='usb' bus='0' port='2'/>