[libvirt] [PATCH 17/18] virhostdevtest: Use modern VFIO

Michal Privoznik mprivozn at redhat.com
Wed Aug 14 11:57:46 UTC 2019


The pci-stub is so old school that no one uses it. All modern
systems have adapted VFIO. Switch our virhostdevtest too.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 tests/virhostdevtest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c
index 20984f3442..f860426678 100644
--- a/tests/virhostdevtest.c
+++ b/tests/virhostdevtest.c
@@ -96,7 +96,7 @@ myInit(void)
         subsys.u.pci.addr.bus = 0;
         subsys.u.pci.addr.slot = i + 1;
         subsys.u.pci.addr.function = 0;
-        subsys.u.pci.backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM;
+        subsys.u.pci.backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO;
         hostdevs[i]->source.subsys = subsys;
     }
 
@@ -104,7 +104,7 @@ myInit(void)
         if (!(dev[i] = virPCIDeviceNew(0, 0, i + 1, 0)))
             goto cleanup;
 
-        virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_KVM);
+        virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_VFIO);
     }
 
     if (VIR_ALLOC(mgr) < 0)
-- 
2.21.0




More information about the libvir-list mailing list