Re: [PATCH v14 03/15] conf: Validate virDomainMemoryDef::targetNode

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

 



On Wed, Jul 27, 2022 at 12:34:49 +0200, Michal Privoznik wrote:
> Almost all of memory models we currently support allow setting
> virDomainMemoryDef::targetNode so that the memory module is
> associated with given guest NUMA node. And we do have a check
> whether the requested node is within bounds, but it's executed
> only when building QEMU's cmd line. Move it into validation
> phase.

The commit message should also point out, that while this commit is
moving the validation to a place that does _not_ validate all the
possible code paths, it's okay, because only the explicit memory device
has user-configurable target node which could break the assumption.

> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/conf/domain_validate.c                    | 13 ++++++
>  src/qemu/qemu_command.c                       |  9 ----
>  .../memory-hotplug-invalid-targetnode.err     |  1 +
>  .../memory-hotplug-invalid-targetnode.xml     | 42 +++++++++++++++++++
>  tests/qemuxml2argvtest.c                      |  1 +
>  5 files changed, 57 insertions(+), 9 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/memory-hotplug-invalid-targetnode.err
>  create mode 100644 tests/qemuxml2argvdata/memory-hotplug-invalid-targetnode.xml

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[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