1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

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 <mprivozn@redhat.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Michal Privoznik 2019-08-12 17:25:57 +02:00
parent 9b3df94ac4
commit 62c4191336

View File

@ -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)