On Tue, Aug 20, 2019 at 04:30:21PM +0200, Michal Privoznik wrote:
KVM style of PCI devices assignment was dropped in kernel in favor of vfio pci (see kernel commit v4.12-rc1~68^2~65). Since vfio is around for quite some time now and is far superior discourage people in using KVM style. Ideally, I'd make QEMU_CAPS_VFIO_PCI implicitly assumed but turns out qemu-3.0.0 doesn't support vfio-pci device for RISC-V. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 6 ----- src/qemu/qemu_command.c | 26 ++------------------- src/qemu/qemu_command.h | 1 - src/qemu/qemu_driver.c | 14 ++++-------- src/qemu/qemu_hostdev.c | 44 +++--------------------------------- src/qemu/qemu_hostdev.h | 1 - src/qemu/qemu_hotplug.c | 20 ++-------------- tests/domaincapstest.c | 3 +-- 8 files changed, 12 insertions(+), 103 deletions(-) diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 7e2dc5a60a..e3983bedb2 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -148,7 +148,6 @@ char *qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem, char *qemuBuildPCIHostdevDevStr(const virDomainDef *def, virDomainHostdevDefPtr dev, unsigned int bootIndex, - const char *configfd, virQEMUCapsPtr qemuCaps); char *qemuBuildRNGDevStr(const virDomainDef *def, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 11f97dbc65..eb373c14d7 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13517,7 +13517,6 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev, int ret = -1; virNodeDeviceDefPtr def = NULL; char *xml = NULL; - bool legacy = qemuHostdevHostSupportsPassthroughLegacy(); bool vfio = qemuHostdevHostSupportsPassthroughVFIO(); virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr; @@ -13544,8 +13543,6 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev, if (!driverName) { if (vfio) { driverName = "vfio"; - } else if (legacy) { - driverName = "kvm"; } else { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("neither VFIO nor KVM device assignment is "
This whole condition can be just: if (!driverName) driverName = "vfio"; now that we would not be able to pick a different one.
@@ -13563,13 +13560,10 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev, } virPCIDeviceSetStubDriver(pci, VIR_PCI_STUB_DRIVER_VFIO); } else if (STREQ(driverName, "kvm")) { - if (!legacy) { - virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", - _("KVM device assignment is currently not " - "supported on this system")); - goto cleanup; - } - virPCIDeviceSetStubDriver(pci, VIR_PCI_STUB_DRIVER_KVM); + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("KVM device assignment is currently not " + "supported on this system"));
s/currently not/no longer/ d/on this system/
+ goto cleanup; } else { virReportError(VIR_ERR_INVALID_ARG, _("unknown driver name '%s'"), driverName);
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list