[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 032/106] pc: ACPI BIOS: reserve SRAT entry for hot
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 032/106] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole |
Date: |
Wed, 18 Jun 2014 19:17:35 +0300 |
From: Igor Mammedov <address@hidden>
Needed for Windows to use hotplugged memory device, otherwise
it complains that server is not configured for memory hotplug.
Tests shows that aftewards it uses dynamically provided
proximity value from _PXM() method if available.
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/acpi-build.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 6ff7fa3..ebc5f03 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1199,6 +1199,10 @@ build_srat(GArray *table_data, GArray *linker,
uint64_t curnode;
int srat_start, numa_start, slots;
uint64_t mem_len, mem_base, next_base;
+ PCMachineState *pcms = PC_MACHINE(qdev_get_machine());
+ ram_addr_t hotplugabble_address_space_size =
+ object_property_get_int(OBJECT(pcms), PC_MACHINE_MEMHP_REGION_SIZE,
+ NULL);
srat_start = table_data->len;
@@ -1263,6 +1267,19 @@ build_srat(GArray *table_data, GArray *linker,
acpi_build_srat_memory(numamem, 0, 0, 0, MEM_AFFINITY_NOFLAGS);
}
+ /*
+ * Entry is required for Windows to enable memory hotplug in OS.
+ * Memory devices may override proximity set by this entry,
+ * providing _PXM method if necessary.
+ */
+ if (hotplugabble_address_space_size) {
+ numamem = acpi_data_push(table_data, sizeof *numamem);
+ acpi_build_srat_memory(numamem, pcms->hotplug_memory_base,
+ hotplugabble_address_space_size, 0,
+ MEM_AFFINITY_HOTPLUGGABLE |
+ MEM_AFFINITY_ENABLED);
+ }
+
build_header(linker, table_data,
(void *)(table_data->data + srat_start),
"SRAT",
--
MST
- [Qemu-devel] [PULL v2 074/106] qom: introduce object_property_get_enum and object_property_get_uint16List, (continued)
- [Qemu-devel] [PULL v2 074/106] qom: introduce object_property_get_enum and object_property_get_uint16List, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 006/106] vl.c: extend -m option to support options for memory hotplug, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 020/106] acpi: memory hotplug ACPI hardware implementation, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 017/106] pc-dimm: add busy address check and address auto-allocation, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 008/106] qdev: expose DeviceState.hotplugged field as a property, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 048/106] vhost: add vhost_get_features and vhost_ack_features, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 076/106] memory: move mem_path handling to memory_region_allocate_system_memory, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 037/106] virtio: Drop superfluous conditionals around g_strdup(), Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 072/106] configure: add Linux libnuma detection, Michael S. Tsirkin, 2014/06/18
- Re: [Qemu-devel] [PULL v2 000/106] pc, pci, virtio, hotplug fixes, enhancements, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 032/106] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 013/106] pc: exit QEMU if number of slots more than supported 256, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 035/106] acpi-test: update expected tables, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 062/106] NUMA: check if the total numa memory size is equal to ram_size, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 041/106] migration: introduce self_announce_delay(), Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 038/106] ich: get rid of spaces in type name, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 028/106] pc: add acpi-device link to PCMachineState, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 031/106] pc: add "hotplug-memory-region-size" property to PC_MACHINE, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 049/106] vhost_net should call the poll callback only when it is set, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 050/106] Refactor virtio-net to use generic get_vhost_net, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 051/106] vhost_net_init will use VhostNetOptions to get all its arguments, Michael S. Tsirkin, 2014/06/18