Re: [PATCH 7/9] qemuDomainAttachDeviceConfig: Allow redirdev coldplug

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

 



On Thu, Jun 09, 2016 at 17:02:42 +0200, Michal Privoznik wrote:
> This is really simple, we just need to append the device into the
> domain def and that's it.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index d7b65f1..0baf2c8 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c

[...]

> @@ -7909,6 +7910,14 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
>          dev->data.memory = NULL;
>          break;
>  
> +    case VIR_DOMAIN_DEVICE_REDIRDEV:
> +        redirdev = dev->data.redirdev;
> +

 You need to check here that the VM has USB controllers defined.
 Otherwise loading of the resulting XML file will fail as there's a check
 in the parser.

> +        if (VIR_APPEND_ELEMENT(vmdef->redirdevs, vmdef->nredirdevs, redirdev) < 0)
> +            return -1;
> +        dev->data.redirdev = NULL;
> +        break;

--
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]