[libvirt] [PATCH 2/2] conf: List only online cpus for virsh emulatorpin

Peter Krempa pkrempa at redhat.com
Tue Nov 8 09:48:14 UTC 2016


On Mon, Nov 07, 2016 at 22:39:34 +0530, Nitesh Konkar wrote:
> From: nitesh konkar <niteshkonkar.libvirt at gmail.com>

Commit message is missing.

> 
> Signed-off-by: Nitesh Konkar <nitkon12 at linux.vnet.ibm.com>
> ---
>  src/qemu/qemu_driver.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 38c8414..256d034 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -5435,6 +5435,8 @@ qemuDomainGetEmulatorPinInfo(virDomainPtr dom,
>      } else if (vm->def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO &&
>                 autoCpuset) {
>          cpumask = autoCpuset;
> +    } else if (vm->def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC) {
> +        cpumask = virHostCPUGetOnlineBitmap();

This function is implemented only on linux, thus it breaks on all other
platforms.

Also the returned value needs to be freed, but is leaked in
this case.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161108/b334b162/attachment-0001.sig>


More information about the libvir-list mailing list