[libvirt] [PATCH 3/4] qemu: hotplug: Introduce hot unplug for mediated devices
Peter Krempa
pkrempa at redhat.com
Tue Mar 27 09:53:58 UTC 2018
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 at redhat.com>
> ---
> 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;
> + }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180327/1e716f7f/attachment-0001.sig>
More information about the libvir-list
mailing list