From: Michal Privoznik Date: Mon, 12 Aug 2019 15:25:57 +0000 (+0200) Subject: virhostdevtest: Use modern VFIO X-Git-Tag: v5.7.0-rc1~182 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62c4191336a305b8e93f574af14386261875df4e;p=thirdparty%2Flibvirt.git virhostdevtest: Use modern VFIO 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 Tested-by: Daniel Henrique Barboza Reviewed-by: Daniel Henrique Barboza --- 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)