mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
virhostdev: Disable legacy kvm assignment
The KVM assignment is going to be removed shortly. Don't let the hostdev module configure it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
c25bc5c831
commit
2e7225ea8c
@ -246,12 +246,16 @@ virHostdevGetPCIHostDevice(const virDomainHostdevDef *hostdev,
|
||||
|
||||
virPCIDeviceSetManaged(actual, hostdev->managed);
|
||||
|
||||
if (pcisrc->backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO)
|
||||
if (pcisrc->backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) {
|
||||
virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_VFIO);
|
||||
else if (pcisrc->backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN)
|
||||
} else if (pcisrc->backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN) {
|
||||
virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_XEN);
|
||||
else
|
||||
virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_KVM);
|
||||
} else {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("pci backend driver '%s' is not supported"),
|
||||
virDomainHostdevSubsysPCIBackendTypeToString(pcisrc->backend));
|
||||
return -1;
|
||||
}
|
||||
|
||||
VIR_STEAL_PTR(*pci, actual);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user