mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00: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:
parent
9b3df94ac4
commit
62c4191336
@ -96,7 +96,7 @@ myInit(void)
|
|||||||
subsys.u.pci.addr.bus = 0;
|
subsys.u.pci.addr.bus = 0;
|
||||||
subsys.u.pci.addr.slot = i + 1;
|
subsys.u.pci.addr.slot = i + 1;
|
||||||
subsys.u.pci.addr.function = 0;
|
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;
|
hostdevs[i]->source.subsys = subsys;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ myInit(void)
|
|||||||
if (!(dev[i] = virPCIDeviceNew(0, 0, i + 1, 0)))
|
if (!(dev[i] = virPCIDeviceNew(0, 0, i + 1, 0)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_KVM);
|
virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_VFIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_ALLOC(mgr) < 0)
|
if (VIR_ALLOC(mgr) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user