diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-10-31 16:38:39 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-11-23 12:12:39 +0200 |
commit | 91aa70ab2a748e3a72004d1a729248221b7bb24a (patch) | |
tree | e438dd682951b8e3ca40c7a8d401f309baeb40dd /include | |
parent | a2b257d6212ade772473f86bf0637480b2578a7e (diff) | |
download | qemu-91aa70ab2a748e3a72004d1a729248221b7bb24a.zip qemu-91aa70ab2a748e3a72004d1a729248221b7bb24a.tar.gz qemu-91aa70ab2a748e3a72004d1a729248221b7bb24a.tar.bz2 |
pc: align DIMM's address/size by backend's alignment value
Performance wise it's better to align GVA by the backend's
page size.
Also do not allow to create DIMM device with suboptimal
size (i.e. not aligned to backends page size) to aviod
memory loss.
Do above only for 2.2 and newer machine types to avoid
breaking working configs with 2.1 machine type.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/i386/pc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 7c3731f..9d85b89 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -24,6 +24,8 @@ * address space begins. * @hotplug_memory: hotplug memory addess space container * @acpi_dev: link to ACPI PM device that performs ACPI hotplug handling + * @enforce_aligned_dimm: check that DIMM's address/size is aligned by + * backend's alignment value if provided */ struct PCMachineState { /*< private >*/ @@ -38,12 +40,14 @@ struct PCMachineState { uint64_t max_ram_below_4g; bool vmport; + bool enforce_aligned_dimm; }; #define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device" #define PC_MACHINE_MEMHP_REGION_SIZE "hotplug-memory-region-size" #define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g" #define PC_MACHINE_VMPORT "vmport" +#define PC_MACHINE_ENFORCE_ALIGNED_DIMM "enforce-aligned-dimm" /** * PCMachineClass: |