pc: regression fix
At Peter's request, this version of only including fix for a regression since 2.12.
The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030:
Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream2
for you to fetch changes up to e40e905fe8c6e0e701c3533f7a3cd92a1ad54677:
tests/acpi: update tables after memory hotplug changes (2018-08-03 21:17:37 +0300)
----------------------------------------------------------------
pc: regression fix
This fixes a regression from 2.12. The fix thus seems appropriate for 3.0.
----------------------------------------------------------------
Igor Mammedov (1):
pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size
Michael S. Tsirkin (1):
tests/acpi: update tables after memory hotplug changes
hw/i386/acpi-build.c | 19 ++++++++++--------- tests/acpi-test-data/pc/SRAT.dimmpxm | Bin 472 -> 472 bytes tests/acpi-test-data/pc/SRAT.memhp | Bin 264 -> 264 bytes tests/acpi-test-data/q35/SRAT.dimmpxm | Bin 472 -> 472 bytes tests/acpi-test-data/q35/SRAT.memhp | Bin 264 -> 264 bytes 5 files changed, 10 insertions(+), 9 deletions(-)
[Qemu-devel] [PULL alternative 1/2] pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size
From: Igor Mammedov <[email protected]>
Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for DIMM devices) broke the first dimm hotplug in following cases:
1: there is no coldplugged dimm in the last numa node
but there is a coldplugged dimm in another node
-m 4096,slots=4,maxmem=32G \ -object memory-backend-ram,id=m0,size=2G \ -device pc-dimm,memdev=m0,node=0 \ -numa node,nodeid=0 \ -numa node,nodeid=1
2: if order of dimms on CLI is:
1st plugged dimm in node1
2nd plugged dimm in node0
-m 4096,slots=4,maxmem=32G \ -object memory-backend-ram,size=2G,id=m0 \ -device pc-dimm,memdev=m0,node=1 \ -object memory-backend-ram,id=m1,size=2G \ -device pc-dimm,memdev=m1,node=0 \ -numa node,nodeid=0 \ -numa node,nodeid=1
(qemu) object_add memory-backend-ram,id=m2,size=1G (qemu) device_add pc-dimm,memdev=m2,node=0
the first DIMM hotplug to any node except the last one fails (Windows is unable to online it).
Length reduction of stub hotplug memory SRAT entry, fixes issue for some reason.
RHBZ: 1609234
--- hw/i386/acpi-build.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
hw/i386/acpi-build.c +10 -9
@@ -2269,7 +2269,16 @@ static void build_srat_hotpluggable_memory(GArray *table_data, uint64_t base, numamem =acpi_data_push (table_data,sizeof *numamem);if (!info) { -build_srat_memory (numamem, cur, end - cur, default_node, +/* +* Entry is required for Windows to enable memory hotplug in OS +* and for Linux to enable SWIOTLB when booted with less than +* 4G of RAM. Windows works better if the entry sets proximity +* to the highest NUMA node in the machine at the end of the +* reserved space. +* Memory devices may override proximity set by this entry, +* providing _PXM method if necessary. +*/ +build_srat_memory (numamem, end -1 ,1 , default_node,MEM_AFFINITY_HOTPLUGGABLE |MEM_AFFINITY_ENABLED );break ; }
@@ -2402,14 +2411,6 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)build_srat_memory (numamem,0 ,0 ,0 ,MEM_AFFINITY_NOFLAGS ); } -/* -* Entry is required for Windows to enable memory hotplug in OS -* and for Linux to enable SWIOTLB when booted with less than -* 4G of RAM. Windows works better if the entry sets proximity -* to the highest NUMA node in the machine. -* Memory devices may override proximity set by this entry, -* providing _PXM method if necessary. -*/ if (hotplugabble_address_space_size) { build_srat_hotpluggable_memory(table_data, machine->device_memory->base, hotplugabble_address_space_size,
Signature · 1 line
MST
[Qemu-devel] [PULL alternative 2/2] tests/acpi: update tables after memory hotplug changes
In reply to Michael S. TsirkinPrevious patch changes acpi tables, update expected files accordingly.
--- tests/acpi-test-data/pc/SRAT.dimmpxm | Bin 472 -> 472 bytes tests/acpi-test-data/pc/SRAT.memhp | Bin 264 -> 264 bytes tests/acpi-test-data/q35/SRAT.dimmpxm | Bin 472 -> 472 bytes tests/acpi-test-data/q35/SRAT.memhp | Bin 264 -> 264 bytes 4 files changed, 0 insertions(+), 0 deletions(-)
tests/acpi-test-data/pc/SRAT.dimmpxm binary +0 -0
tests/acpi-test-data/pc/SRAT.memhp binary +0 -0
tests/acpi-test-data/q35/SRAT.dimmpxm binary +0 -0
tests/acpi-test-data/q35/SRAT.memhp binary +0 -0
Signature · 1 line
MST