On Tue, Mar 27, 2018 at 10:57:15 +0200, Erik Skultety wrote: > Mediated devices support hot-{plug,unplug} since their introduction in > kernel 4.10, however this feature has been missing in libvirt since > commit ec783d7c introduced a hostdev type for mdevs. > > Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx> > --- > src/qemu/qemu_hotplug.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > > diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c > index 4abc7393b..ff77b47bc 100644 > --- a/src/qemu/qemu_hotplug.c > +++ b/src/qemu/qemu_hotplug.c [...] > @@ -5059,6 +5071,32 @@ qemuDomainDetachSCSIVHostDevice(virQEMUDriverPtr driver, > return ret; > } > > + > +static int > +qemuDomainDetachMediatedDevice(virQEMUDriverPtr driver, > + virDomainObjPtr vm, > + virDomainHostdevDefPtr detach) > +{ > + int ret = -1; > + qemuDomainObjPrivatePtr priv = vm->privateData; > + > + if (!detach->info->alias) { > + virReportError(VIR_ERR_OPERATION_FAILED, > + "%s", _("device cannot be detached without a device alias")); This line is very long and can be optimized by moving the formatting string on the previous line. > + return -1; > + }
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list