libvirt/tests/qemuxml2argvdata/hugepages-nodeset.args
Pavel Hrdina 0a476f1521 conf: Introduce virDomainDefPostParseMemtune
Previously we were ignoring "nodeset" attribute for hugepage pages
if there was no guest NUMA topology configured in the domain XML.
Commit <fa6bdf6afa878b8d7c5ed71664ee72be8967cdc5> partially fixed
that issue but it introduced a somehow valid regression.

In case that there is no guest NUMA topology configured and the
"nodeset" attribute is set to "0" it was accepted and was working
properly even though it was not completely valid XML.

This patch introduces a workaround that it will ignore the nodeset="0"
only in case that there is no guest NUMA topology in order not to
hit the validation error.

After this commit the following XML configuration is valid:

  <memoryBacking>
    <hugepages>
      <page size='2048' unit='KiB' nodeset='0'/>
    </hugepages>
  </memoryBacking>

but this configuration remains invalid:

  <memoryBacking>
    <hugepages>
      <page size='2048' unit='KiB' nodeset='0'/>
      <page size='1048576' unit='KiB'/>
    </hugepages>
  </memoryBacking>

The issue with the second configuration is that it was originally
working, however changing the order of the <page> elements resolved
into using different page size for the guest.  The code is written
in a way that it expect only one page configured and always uses only
the first page in case that there is no guest NUMA topology configured.
See qemuBuildMemPathStr() function for details.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1591235

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-08-10 17:06:48 +02:00

26 lines
634 B
Plaintext

LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-i686 \
-name SomeDummyHugepagesGuest \
-S \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-m 1024 \
-mem-prealloc \
-mem-path /dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu \
-smp 2,sockets=2,cores=1,threads=1 \
-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,\
path=/tmp/lib/domain--1-SomeDummyHugepagesGu/monitor.sock,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-usb