]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Align memory module sizes to 2MiB
authorPeter Krempa <pkrempa@redhat.com>
Wed, 23 Sep 2015 11:07:03 +0000 (13:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 23 Sep 2015 11:54:54 +0000 (13:54 +0200)
commit624ec1c2f9157082db415711cd3b347d1af7f5c4
tree33459c5d74eefa24ac8cb68188ff13979870fbcf
parent035947eb8743306a421b3c71f26c75f749000dfc
qemu: Align memory module sizes to 2MiB

My original implementation was based on a qemu version that still did
not have all the checks in place. Using sizes that would align to odd
megabyte increments will produce the following error:

qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: backend memory size must be multiple of 0x200000
qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: Device 'pc-dimm' could not be initialized

Introduce an alignment retrieval function for memory devices and use it
to align the devices separately and modify a test case to verify it.
src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.xml