[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 33/35] pc: ACPI BIOS: reserve SRAT entry for hotplug
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 33/35] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole |
Date: |
Fri, 4 Apr 2014 15:36:58 +0200 |
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>
---
hw/i386/acpi-build.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index ef89e99..012b100 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1197,6 +1197,8 @@ 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 hotplug_as_size = memory_region_size(&pcms->hotplug_memory);
srat_start = table_data->len;
@@ -1261,6 +1263,18 @@ build_srat(GArray *table_data, GArray *linker,
acpi_build_srat_memory(numamem, 0, 0, 0, MEM_AFFINITY_NOFLAGS);
}
+ /*
+ * Fake entry required by Windows to enable memory hotplug in OS.
+ * Individual DIMM devices override proximity set here via _PXM method,
+ * which returns associated with it NUMA node id.
+ */
+ if (hotplug_as_size) {
+ numamem = acpi_data_push(table_data, sizeof *numamem);
+ acpi_build_srat_memory(numamem, pcms->hotplug_memory_base,
+ hotplug_as_size, 0, MEM_AFFINITY_HOTPLUGGABLE |
+ MEM_AFFINITY_ENABLED);
+ }
+
build_header(linker, table_data,
(void *)(table_data->data + srat_start),
"SRAT",
--
1.9.0
- Re: [Qemu-devel] [PATCH 23/35] acpi:piix4: make plug/unlug callbacks generic, (continued)
- [Qemu-devel] [PATCH 22/35] trace: add DIMM slot & address allocation for target-i386, Igor Mammedov, 2014/04/04
- [Qemu-devel] [PATCH 25/35] pc: ich9 lpc: make it work with global/compat properties, Igor Mammedov, 2014/04/04
- [Qemu-devel] [PATCH 16/35] pc: add memory hotplug handler to PC_MACHINE, Igor Mammedov, 2014/04/04
- [Qemu-devel] [PATCH 27/35] pc: migrate piix4 & ich9 MemHotplugState, Igor Mammedov, 2014/04/04
- [Qemu-devel] [PATCH 26/35] acpi:ich9: add memory hotplug handling, Igor Mammedov, 2014/04/04
- [Qemu-devel] [PATCH 32/35] pc: ACPI BIOS: use enum for defining memory affinity flags, Igor Mammedov, 2014/04/04
- [Qemu-devel] [PATCH 29/35] pc: ACPI BIOS: punch holes in PCI0._CRS for memory hotplug IO region, Igor Mammedov, 2014/04/04
- [Qemu-devel] [PATCH 33/35] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole,
Igor Mammedov <=
[Qemu-devel] [PATCH 34/35] pc: ACPI BIOS: make GPE.3 handle memory hotplug event on PIIX and Q35 machines, Igor Mammedov, 2014/04/04
[Qemu-devel] [PATCH 31/35] pc: ACPI BIOS: implement memory hotplug interface, Igor Mammedov, 2014/04/04
Message not available