Re: [PATCH] qemu: numa: Don't return automatic nodeset for inactive domain

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

 



On Wed, Apr 26, 2017 at 03:05:00PM +0200, Peter Krempa wrote:
> qemuDomainGetNumaParameters would return the automatic nodeset even for
> the persistent config if the domain was running. This is incorrect since
> the automatic nodeset will be re-queried upon starting the vm.
>
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1445325
> ---
>  src/qemu/qemu_driver.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index e39de625d..1ba3e0943 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -9461,6 +9461,8 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
>      char *nodeset = NULL;
>      int ret = -1;
>      virDomainDefPtr def = NULL;
> +    bool live = false;
> +    virBitmapPtr autoNodeset = NULL;
>
>      virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
>                    VIR_DOMAIN_AFFECT_CONFIG |
> @@ -9473,9 +9475,12 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
>      if (virDomainGetNumaParametersEnsureACL(dom->conn, vm->def) < 0)
>          goto cleanup;
>
> -    if (!(def = virDomainObjGetOneDef(vm, flags)))
> +    if (!(def = virDomainObjGetOneDefState(vm, flags, &live)))
>          goto cleanup;
>
> +    if (live)
> +        autoNodeset = priv->autoNodeset;
> +
>      if ((*nparams) == 0) {
>          *nparams = QEMU_NB_NUMA_PARAM;
>          ret = 0;
> @@ -9496,8 +9501,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
>              break;
>
>          case 1: /* fill numa nodeset here */
> -            nodeset = virDomainNumatuneFormatNodeset(def->numa,
> -                                                     priv->autoNodeset, -1);
> +            nodeset = virDomainNumatuneFormatNodeset(def->numa, autoNodeset, -1);
>              if (!nodeset ||
>                  virTypedParameterAssign(param, VIR_DOMAIN_NUMA_NODESET,
>                                          VIR_TYPED_PARAM_STRING, nodeset) < 0)

ACK

Erik

--
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]
  Powered by Linux