2015-11-06 13:20:06 +00:00
|
|
|
LC_ALL=C \
|
|
|
|
PATH=/bin \
|
|
|
|
HOME=/home/test \
|
|
|
|
USER=test \
|
|
|
|
LOGNAME=test \
|
|
|
|
QEMU_AUDIO_DRV=spice \
|
2015-06-24 16:09:57 +00:00
|
|
|
/usr/bin/qemu-system-x86_64 \
|
2015-11-06 14:29:41 +00:00
|
|
|
-name fedora \
|
2015-06-24 16:09:57 +00:00
|
|
|
-S \
|
|
|
|
-M pc-i440fx-2.3 \
|
qemuBuildMemoryBackendStr: Honour passed @pagesize
So far the argument has not much meaning and was practically ignored.
This is not good since when doing memory hotplug, the size of desired
hugepage backing is passed in that argument. Taking closer look at the
tests I'm fixing reveals the bug. For instance, while the following is
in the test:
<memory model='dimm'>
<source>
<nodemask>1-3</nodemask>
<pagesize unit='KiB'>4096</pagesize>
</source>
<target>
<size unit='KiB'>524287</size>
<node>0</node>
</target>
<address type='dimm' slot='0' base='0x100000000'/>
</memory>
the generated commandline corresponding to this XML was:
-object memory-backend-ram,id=memdimm0,size=536870912,\
host-nodes=1-3,policy=bind
Have you noticed? Yes, memory-backend-ram! Nothing can be further away
from the right answer. The hugepage backing is requested in the XML
and we happily ignore it. This is just not right. It's
memory-backend-file which should have been used:
-object memory-backend-file,id=memdimm0,prealloc=yes,\
mem-path=/dev/hugepages4M/libvirt/qemu,size=536870912,\
host-nodes=1-3,policy=bind
The problem is, that @pagesize passed to qemuBuildMemoryBackendStr
(where this part of commandline is built) was ignored. The hugepage to
back memory was searched only and only by NUMA nodes pinning. This
works only for regular guest NUMA nodes.
Then, I'm changing the hugepages size in the test XMLs too. This is
simply because in the test suite we create dummy mount points just for
2M and 1G hugepages. And in the test 4M was requested. I'm sticking to
2M, but 1G should just work too.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-06-25 15:27:29 +00:00
|
|
|
-m size=1048576k,slots=16,maxmem=1099511627776k \
|
2016-06-23 11:29:16 +00:00
|
|
|
-smp 2,sockets=2,cores=1,threads=1 \
|
2015-10-01 05:34:57 +00:00
|
|
|
-mem-prealloc \
|
2016-11-22 12:21:51 +00:00
|
|
|
-mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \
|
2015-10-01 05:34:57 +00:00
|
|
|
-numa node,nodeid=0,cpus=0-1,mem=1024 \
|
qemuBuildMemoryBackendStr: Honour passed @pagesize
So far the argument has not much meaning and was practically ignored.
This is not good since when doing memory hotplug, the size of desired
hugepage backing is passed in that argument. Taking closer look at the
tests I'm fixing reveals the bug. For instance, while the following is
in the test:
<memory model='dimm'>
<source>
<nodemask>1-3</nodemask>
<pagesize unit='KiB'>4096</pagesize>
</source>
<target>
<size unit='KiB'>524287</size>
<node>0</node>
</target>
<address type='dimm' slot='0' base='0x100000000'/>
</memory>
the generated commandline corresponding to this XML was:
-object memory-backend-ram,id=memdimm0,size=536870912,\
host-nodes=1-3,policy=bind
Have you noticed? Yes, memory-backend-ram! Nothing can be further away
from the right answer. The hugepage backing is requested in the XML
and we happily ignore it. This is just not right. It's
memory-backend-file which should have been used:
-object memory-backend-file,id=memdimm0,prealloc=yes,\
mem-path=/dev/hugepages4M/libvirt/qemu,size=536870912,\
host-nodes=1-3,policy=bind
The problem is, that @pagesize passed to qemuBuildMemoryBackendStr
(where this part of commandline is built) was ignored. The hugepage to
back memory was searched only and only by NUMA nodes pinning. This
works only for regular guest NUMA nodes.
Then, I'm changing the hugepages size in the test XMLs too. This is
simply because in the test suite we create dummy mount points just for
2M and 1G hugepages. And in the test 4M was requested. I'm sticking to
2M, but 1G should just work too.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-06-25 15:27:29 +00:00
|
|
|
-object memory-backend-file,id=memdimm0,prealloc=yes,\
|
2016-11-22 12:21:51 +00:00
|
|
|
mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,\
|
|
|
|
host-nodes=1-3,policy=bind \
|
2016-11-01 05:07:09 +00:00
|
|
|
-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
|
2015-11-06 14:29:52 +00:00
|
|
|
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
|
2015-06-24 16:09:57 +00:00
|
|
|
-nodefaults \
|
2016-02-26 08:15:55 +00:00
|
|
|
-monitor unix:/tmp/lib/domain--1-fedora/monitor.sock,server,nowait \
|
2015-06-24 16:09:57 +00:00
|
|
|
-rtc base=utc,driftfix=slew \
|
|
|
|
-no-kvm-pit-reinjection \
|
2017-03-02 18:24:22 +00:00
|
|
|
-no-hpet \
|
2015-06-24 16:09:57 +00:00
|
|
|
-global PIIX4_PM.disable_s3=1 \
|
|
|
|
-global PIIX4_PM.disable_s4=1 \
|
|
|
|
-boot c \
|
|
|
|
-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 \
|
2015-11-06 13:20:06 +00:00
|
|
|
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,\
|
|
|
|
addr=0x6 \
|
2015-06-24 16:09:57 +00:00
|
|
|
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1 \
|
|
|
|
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 \
|
|
|
|
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 \
|
2015-12-28 14:13:52 +00:00
|
|
|
-drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,\
|
|
|
|
id=drive-virtio-disk0 \
|
2015-11-06 13:20:06 +00:00
|
|
|
-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,\
|
|
|
|
id=virtio-disk0 \
|
2016-05-20 11:49:15 +00:00
|
|
|
-drive if=none,media=cdrom,id=drive-ide0-0-0,readonly=on \
|
2015-06-24 16:09:57 +00:00
|
|
|
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
|
|
|
|
-serial pty \
|
|
|
|
-chardev socket,id=charchannel0,\
|
2015-11-06 13:20:06 +00:00
|
|
|
path=/var/lib/libvirt/qemu/channel/target/fedora.org.qemu.guest_agent.0,server,\
|
|
|
|
nowait \
|
|
|
|
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\
|
|
|
|
id=channel0,name=org.qemu.guest_agent.0 \
|
2015-06-24 16:09:57 +00:00
|
|
|
-chardev spicevmc,id=charchannel1,name=vdagent \
|
2015-11-06 13:20:06 +00:00
|
|
|
-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,\
|
|
|
|
id=channel1,name=com.redhat.spice.0 \
|
2015-08-12 14:52:18 +00:00
|
|
|
-device usb-tablet,id=input0,bus=usb.0,port=1 \
|
2016-05-09 12:30:27 +00:00
|
|
|
-spice port=5901,tls-port=5902,addr=127.0.0.1,x509-dir=/etc/pki/libvirt-spice \
|
2015-06-24 16:09:57 +00:00
|
|
|
-vga qxl \
|
|
|
|
-global qxl-vga.ram_size=67108864 \
|
|
|
|
-global qxl-vga.vram_size=67108864 \
|
|
|
|
-device intel-hda,id=sound0,bus=pci.0,addr=0x4 \
|
|
|
|
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
|
|
|
|
-chardev spicevmc,id=charredir0,name=usbredir \
|
2015-08-12 14:52:18 +00:00
|
|
|
-device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \
|
2015-06-24 16:09:57 +00:00
|
|
|
-chardev spicevmc,id=charredir1,name=usbredir \
|
2015-08-12 14:52:18 +00:00
|
|
|
-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \
|
2015-06-24 16:09:57 +00:00
|
|
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8
|