Re: [PATCH 05/12] virhostdev: Disable legacy kvm assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/20/19 11:30 AM, Michal Privoznik wrote:
The KVM assignment is going to be removed shortly. Don't let the
hostdev module configure it.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---


Reviewed-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
Tested-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>


  src/util/virhostdev.c | 12 ++++++++----
  1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c
index e3f48a9a2e..29e75ffc84 100644
--- a/src/util/virhostdev.c
+++ b/src/util/virhostdev.c
@@ -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;

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux