On Thu, Feb 26, 2015 at 17:58:36 +0800, Zhu Guihua wrote:
On 02/25/2015 10:44 PM, Peter Krempa wrote:
> Add support to start qemu instance with 'pc-dimm' device. Thanks to the
> refactors we are able to reuse the existing function to determine the
> parameters.
> ---
>
> Notes:
> Version 2:
> - dropped the ACPI naming
>
> src/qemu/qemu_command.c | 130 ++++++++++++++++++++-
> src/qemu/qemu_domain.c | 26 ++++-
> src/qemu/qemu_domain.h | 1 +
> .../qemuxml2argv-memory-hotplug-dimm.args | 11 ++
> tests/qemuxml2argvtest.c | 2 +
> tests/qemuxml2xmltest.c | 1 +
> 6 files changed, 167 insertions(+), 4 deletions(-)
> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.args
...
> +/**
> + * qemuDomainMemoryDeviceAlignSize:
> + * @mem: memory device definition object
> + *
> + * Aligns the size of the memory module as qemu enforces it. The size is updated
> + * inplace. Default rounding is now to 1 MiB (qemu requires rouding to page,
> + * size so this should be safe).
> + */
> +void
> +qemuDomainMemoryDeviceAlignSize(virDomainMemoryDefPtr mem)
> +{
> + mem->size = VIR_ROUND_UP(mem->size, 1024);
> +}
Because of linux limitation, the size of the memory module of linux
guests must be multiples of 128MiB,
so could we add this limitation by libvirt which knows type of guest it
installs/runs?
Libvirt doesn't know the type of the guest that it's running inside. I
also remember reading somewhere that the limit for Windows is 2MiB, so
we can only agree on something minimal.
Anything above is should be limited by the management using libvirt.
Regards,
Zhu
Peter