]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/acpi-build: build SRAT memory affinity structures for DIMM devices
authorHaozhong Zhang <haozhong.zhang@intel.com>
Sun, 11 Mar 2018 03:02:13 +0000 (11:02 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 20 Mar 2018 01:34:52 +0000 (03:34 +0200)
commit848a1cc1e8b04301d40aef2a0e21a783b8dcc1c5
treee1c616cddea522bf5fd5f754d8234ebfb35f607d
parent6388e18de9c6842de9a1307b61d42c8e4549009c
hw/acpi-build: build SRAT memory affinity structures for DIMM devices

ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity
domain of a NVDIMM SPA range must match with corresponding entry in
SRAT table.

The address ranges of vNVDIMM in QEMU are allocated from the
hot-pluggable address space, which is entirely covered by one SRAT
memory affinity structure. However, users can set the vNVDIMM
proximity domain in NFIT SPA range structure by the 'node' property of
'-device nvdimm' to a value different than the one in the above SRAT
memory affinity structure.

In order to solve such proximity domain mismatch, this patch builds
one SRAT memory affinity structure for each DIMM device present at
boot time, including both PC-DIMM and NVDIMM, with the proximity
domain specified in '-device pc-dimm' or '-device nvdimm'.

The remaining hot-pluggable address space is covered by one or multiple
SRAT memory affinity structures with the proximity domain of the last
node as before.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c