libvirt/tests/qemuxml2argvdata/fd-memory-numa-topology3.args
Michal Privoznik 3010a69226 qemu_command: Generate -mem-prealloc in one corner case more
When guest has NUMA nodes and QEMU is new enough to report
default RAM ID then ideally we would use -numa memdev= combined
with memory-backend-* combo becasue -mem-path/-mem-prealloc/-numa
mem are deprecated. Well, there is one problem - the .memdev=
attribute is machine type dependent (just look at arguments of
virQEMUCapsGetMachineNumaMemSupported()) and to ensure backwards
compatibility we prefer -numa mem= over -numa memdev=.

But there was one corner case when -mem-prealloc was requested
but not generated on the cmd line. It all starts with
qemuBuildMemCommandLine() which generates just '-m XXX' and
because it sees defaultRAMid and guest NUMA nodes greater than
zero it does nothing more.

Then, qemuBuildNumaCommandLine() sees that -numa mem= is still
supported for given machine type and nothing else set
@needBackend thus qemuBuildMemPathStr() is called which output
-mem-prealloc only in a few cases assuming it was outputted
earlier.

Reported-by: Jing Qi <jinqi@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-11-22 12:27:29 +01:00

37 lines
1.6 KiB
Plaintext

LC_ALL=C \
PATH=/bin \
HOME=/tmp/lib/domain--1-instance-00000092 \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/tmp/lib/domain--1-instance-00000092/.local/share \
XDG_CACHE_HOME=/tmp/lib/domain--1-instance-00000092/.cache \
XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-x86_64 \
-name guest=instance-00000092,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-instance-00000092/master-key.aes \
-machine pc-i440fx-2.3,accel=kvm,usb=off,dump-guest-core=off \
-m 43008 \
-realtime mlock=off \
-smp 32,sockets=1,cores=24,threads=1 \
-object memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0,share=on,prealloc=on,size=15032385536 \
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
-object memory-backend-file,id=ram-node1,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node1,share=on,prealloc=on,size=15032385536 \
-numa node,nodeid=1,cpus=2-3,memdev=ram-node1 \
-object memory-backend-file,id=ram-node2,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node2,share=off,prealloc=on,size=15032385536 \
-numa node,nodeid=2,cpus=4-5,memdev=ram-node2 \
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-instance-00000092/monitor.sock,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-boot strict=on \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-msg timestamp=on