]> git.ipfire.org Git - thirdparty/qemu.git/commit
pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size
authorIgor Mammedov <imammedo@redhat.com>
Mon, 30 Jul 2018 09:41:41 +0000 (11:41 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 3 Aug 2018 08:35:21 +0000 (11:35 +0300)
commit10efd7e1088855dc019e6a248ac7f9b24af8dd26
tree9f0bcdc090b5c650993f8fcca1cd8c921047a920
parent16e2841d2032347b9d22e5b37ac852771da9cc3b
pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size

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

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>
hw/i386/acpi-build.c