Re: [PATCH 2/4] qemu: Check QEMU_CAPS_OBJECT_IOTHREAD for qemuDomainPinIOThread

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

 



On Tue, Oct 13, 2015 at 11:47:08 -0400, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1249981
> 
> When trying to pin the thread to the live process in qemuDomainPinIOThread,
> there was no check whether the binary supported IOThreads, thus thread_id = 0
> (eg current) would be erroneously used.
> 
> Follow qemuDomainChgIOThread and only check for the bit if changing
> the live definition vs. changing the persistent definition.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 8cd5ee3..7308c3b 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -5813,6 +5813,12 @@ qemuDomainPinIOThread(virDomainPtr dom,
>          virDomainIOThreadIDDefPtr iothrid;
>          virBitmapPtr cpumask;
>  
> +        if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) {
> +            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> +                           _("IOThreads not supported with this binary"));
> +            goto endjob;
> +        }
> +
>          if (!(iothrid = virDomainIOThreadIDFind(def, iothread_id))) {
>              virReportError(VIR_ERR_INVALID_ARG,
>                             _("iothread %d not found"), iothread_id);

Here this function should return that the iothread could not be found as
such VM shouldn't allow any iothreads if we don't support them.

Peter

Attachment: signature.asc
Description: Digital signature

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