mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemu: command: Shuffle around formating of alias for memory backend objs
Move the alias as the second formated argument and tweak the tests so that a future refactor that will change the order doesn't break tests.
This commit is contained in:
parent
db3b1c4a1c
commit
172100ac85
@ -4623,8 +4623,8 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
||||
if (!(mem_path = qemuGetHugepagePath(&cfg->hugetlbfs[i])))
|
||||
goto cleanup;
|
||||
|
||||
virBufferAsprintf(&buf, "memory-backend-file,prealloc=yes,mem-path=%s",
|
||||
mem_path);
|
||||
virBufferAsprintf(&buf, "memory-backend-file,id=%s%zu", aliasPrefix, id);
|
||||
virBufferAsprintf(&buf, ",prealloc=yes,mem-path=%s", mem_path);
|
||||
|
||||
switch (memAccess) {
|
||||
case VIR_MEM_ACCESS_SHARED:
|
||||
@ -4647,11 +4647,10 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
virBufferAddLit(&buf, "memory-backend-ram");
|
||||
virBufferAsprintf(&buf, "memory-backend-ram,id=%s%zu", aliasPrefix, id);
|
||||
}
|
||||
|
||||
virBufferAsprintf(&buf, ",size=%lluM,id=%s%zu", size / 1024,
|
||||
aliasPrefix, id);
|
||||
virBufferAsprintf(&buf, ",size=%lluM", size / 1024);
|
||||
|
||||
if (userNodeset) {
|
||||
if (!(nodemask = virBitmapFormat(userNodeset)))
|
||||
|
@ -1,16 +1,16 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu -S -M pc -m 4096 -smp 4 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages1G/libvirt/qemu,\
|
||||
size=1024M,id=ram-node0,host-nodes=0-3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node0,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,size=1024M,host-nodes=0-3,policy=bind \
|
||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages2M/libvirt/qemu,\
|
||||
size=1024M,id=ram-node1,host-nodes=0-3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node1,prealloc=yes,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,size=1024M,host-nodes=0-3,policy=bind \
|
||||
-numa node,nodeid=1,cpus=1,memdev=ram-node1 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages1G/libvirt/qemu,\
|
||||
size=1024M,id=ram-node2,host-nodes=0-3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node2,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,size=1024M,host-nodes=0-3,policy=bind \
|
||||
-numa node,nodeid=2,cpus=2,memdev=ram-node2 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages1G/libvirt/qemu,\
|
||||
size=1024M,id=ram-node3,host-nodes=3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node3,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,size=1024M,host-nodes=3,policy=bind \
|
||||
-numa node,nodeid=3,cpus=3,memdev=ram-node3 \
|
||||
-nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
|
||||
-hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none
|
||||
|
@ -1,10 +1,10 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu -S -M pc -m 1024 -smp 2 \
|
||||
-object memory-backend-file,prealloc=yes,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,size=256M,id=ram-node0 \
|
||||
-object memory-backend-file,id=ram-node0,prealloc=yes,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,size=256M \
|
||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
||||
-object memory-backend-file,prealloc=yes,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,size=768M,id=ram-node1 \
|
||||
-object memory-backend-file,id=ram-node1,prealloc=yes,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,size=768M \
|
||||
-numa node,nodeid=1,cpus=1,memdev=ram-node1 \
|
||||
-nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-usb -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none
|
||||
|
@ -1,8 +1,8 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu -S -M pc -m 1024 -smp 2 \
|
||||
-numa node,nodeid=0,cpus=0,mem=256 \
|
||||
-object memory-backend-file,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,size=768M,id=ram-node1 \
|
||||
-object memory-backend-file,id=ram-node1,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,size=768M \
|
||||
-numa node,nodeid=1,cpus=1,memdev=ram-node1 \
|
||||
-nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
|
||||
-hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none
|
||||
|
@ -1,16 +1,18 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu -S -M pc -m 4096 -smp 4 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages1G/libvirt/qemu,\
|
||||
size=1024M,id=ram-node0,host-nodes=0-3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node0,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,size=1024M,host-nodes=0-3,policy=bind \
|
||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages2M/libvirt/qemu,\
|
||||
share=on,size=1024M,id=ram-node1,host-nodes=0-3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node1,prealloc=yes,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,share=on,size=1024M,host-nodes=0-3,\
|
||||
policy=bind \
|
||||
-numa node,nodeid=1,cpus=1,memdev=ram-node1 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages1G/libvirt/qemu,\
|
||||
share=off,size=1024M,id=ram-node2,host-nodes=0-3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node2,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,share=off,size=1024M,host-nodes=0-3,\
|
||||
policy=bind \
|
||||
-numa node,nodeid=2,cpus=2,memdev=ram-node2 \
|
||||
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages1G/libvirt/qemu,\
|
||||
size=1024M,id=ram-node3,host-nodes=3,policy=bind \
|
||||
-object memory-backend-file,id=ram-node3,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,size=1024M,host-nodes=3,policy=bind \
|
||||
-numa node,nodeid=3,cpus=3,memdev=ram-node3 \
|
||||
-nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
|
||||
-hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none
|
||||
|
@ -1,6 +1,6 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/kvm -S -M pc -m 64 -smp 2 \
|
||||
-object memory-backend-ram,size=32M,id=ram-node0,host-nodes=3,policy=preferred \
|
||||
-object memory-backend-ram,id=ram-node0,size=32M,host-nodes=3,policy=preferred \
|
||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
||||
-numa node,nodeid=1,cpus=1,mem=32 \
|
||||
-nographic -monitor unix:/tmp/test-monitor,server,nowait \
|
||||
|
@ -1,10 +1,10 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/kvm -S -M pc -m 24104 -smp 32 \
|
||||
-object memory-backend-ram,size=20M,id=ram-node0,host-nodes=3,policy=preferred \
|
||||
-object memory-backend-ram,id=ram-node0,size=20M,host-nodes=3,policy=preferred \
|
||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
||||
-object memory-backend-ram,size=645M,id=ram-node1,host-nodes=0-7,policy=bind \
|
||||
-object memory-backend-ram,id=ram-node1,size=645M,host-nodes=0-7,policy=bind \
|
||||
-numa node,nodeid=1,cpus=1-27,cpus=29,memdev=ram-node1 \
|
||||
-object memory-backend-ram,size=23440M,id=ram-node2,\
|
||||
-object memory-backend-ram,id=ram-node2,size=23440M,\
|
||||
host-nodes=1-2,host-nodes=5,host-nodes=7,policy=bind \
|
||||
-numa node,nodeid=2,cpus=28,cpus=30-31,memdev=ram-node2 \
|
||||
-nographic -monitor unix:/tmp/test-monitor,server,nowait \
|
||||
|
Loading…
Reference in New Issue
Block a user