[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 032/103] pc: ACPI BIOS: reserve SRAT entry for hotplu
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 032/103] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole |
Date: |
Tue, 17 Jun 2014 20:38:08 +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 58e7306..c53f0c7 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 016/103] pc: add memory hotplug handler to PC_MACHINE, (continued)
- [Qemu-devel] [PULL 016/103] pc: add memory hotplug handler to PC_MACHINE, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 026/103] acpi:ich9: add memory hotplug handling, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 027/103] pc: migrate piix4 & ich9 MemHotplugState, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 029/103] pc: propagate memory hotplug event to ACPI device, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 030/103] pc: ACPI BIOS: implement memory hotplug interface, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 031/103] pc: add "hotplug-memory-region-size" property to PC_MACHINE, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 037/103] virtio: Drop superfluous conditionals around g_strdup(), Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 039/103] ich: get rid of spaces in type name, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 040/103] pc: q35: acpi: report error to user on unsupported unplug request, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 038/103] qtest: fix hex2nib for capital characters, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 032/103] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 041/103] migration: export SELF_ANNOUNCE_ROUNDS, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 042/103] migration: introduce self_announce_delay(), Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 043/103] virtio-net: announce self by guest, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 044/103] Add kvm_eventfds_enabled function, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 045/103] Add chardev API qemu_chr_fe_read_all, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 049/103] vhost: add vhost_get_features and vhost_ack_features, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 050/103] vhost_net should call the poll callback only when it is set, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 051/103] Refactor virtio-net to use generic get_vhost_net, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 052/103] vhost_net_init will use VhostNetOptions to get all its arguments, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 053/103] Add vhost_ops to vhost_dev struct and replace all relevant ioctls, Michael S. Tsirkin, 2014/06/17