qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices
@ 2018-03-05  6:57 Haozhong Zhang
  2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 1/5] pc-dimm: refactor qmp_pc_dimm_device_list Haozhong Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Haozhong Zhang @ 2018-03-05  6:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, Igor Mammedov, Xiao Guangrong, Paolo Bonzini,
	Richard Henderson, Eduardo Habkost, Marcel Apfelbaum,
	Stefan Hajnoczi, Dan Williams, Haozhong Zhang, dgilbert,
	David Gibson, Alexander Graf, Eric Blake, Markus Armbruster,
	qemu-ppc

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.


Changes in v3:
 * (Patch 1&2) Use qmp_pc_dimm_device_list to get information of DIMM
   devices and move it to separate patches.
 * (Patch 3) Replace while loop by a more readable for loop.
 * (Patch 3) Refactor the flag setting code.
 * (Patch 3) s/'static-plugged'/'present at boot time' in commit message.

Changes in v2:
 * Build SRAT memory affinity structures of PC-DIMM devices as well.
 * Add test cases.


Haozhong Zhang (5):
  pc-dimm: refactor qmp_pc_dimm_device_list
  qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList
  hw/acpi-build: build SRAT memory affinity structures for DIMM devices
  tests/bios-tables-test: allow setting extra machine options
  tests/bios-tables-test: add test cases for DIMM proximity

 hmp.c                                 |  14 +++--
 hw/i386/acpi-build.c                  |  60 +++++++++++++++++++--
 hw/mem/pc-dimm.c                      |  99 ++++++++++++++++++++--------------
 hw/ppc/spapr.c                        |   3 +-
 include/hw/mem/pc-dimm.h              |   2 +-
 numa.c                                |  23 ++++----
 qapi-schema.json                      |  18 ++++++-
 qmp.c                                 |   7 +--
 stubs/qmp_pc_dimm.c                   |   4 +-
 tests/acpi-test-data/pc/APIC.dimmpxm  | Bin 0 -> 136 bytes
 tests/acpi-test-data/pc/DSDT.dimmpxm  | Bin 0 -> 6710 bytes
 tests/acpi-test-data/pc/NFIT.dimmpxm  | Bin 0 -> 224 bytes
 tests/acpi-test-data/pc/SRAT.dimmpxm  | Bin 0 -> 416 bytes
 tests/acpi-test-data/pc/SSDT.dimmpxm  | Bin 0 -> 685 bytes
 tests/acpi-test-data/q35/APIC.dimmpxm | Bin 0 -> 136 bytes
 tests/acpi-test-data/q35/DSDT.dimmpxm | Bin 0 -> 9394 bytes
 tests/acpi-test-data/q35/NFIT.dimmpxm | Bin 0 -> 224 bytes
 tests/acpi-test-data/q35/SRAT.dimmpxm | Bin 0 -> 416 bytes
 tests/acpi-test-data/q35/SSDT.dimmpxm | Bin 0 -> 685 bytes
 tests/bios-tables-test.c              |  78 +++++++++++++++++++++------
 20 files changed, 225 insertions(+), 83 deletions(-)
 create mode 100644 tests/acpi-test-data/pc/APIC.dimmpxm
 create mode 100644 tests/acpi-test-data/pc/DSDT.dimmpxm
 create mode 100644 tests/acpi-test-data/pc/NFIT.dimmpxm
 create mode 100644 tests/acpi-test-data/pc/SRAT.dimmpxm
 create mode 100644 tests/acpi-test-data/pc/SSDT.dimmpxm
 create mode 100644 tests/acpi-test-data/q35/APIC.dimmpxm
 create mode 100644 tests/acpi-test-data/q35/DSDT.dimmpxm
 create mode 100644 tests/acpi-test-data/q35/NFIT.dimmpxm
 create mode 100644 tests/acpi-test-data/q35/SRAT.dimmpxm
 create mode 100644 tests/acpi-test-data/q35/SSDT.dimmpxm

-- 
2.14.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-03-07 12:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05  6:57 [Qemu-devel] [PATCH v3 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices Haozhong Zhang
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 1/5] pc-dimm: refactor qmp_pc_dimm_device_list Haozhong Zhang
2018-03-07 10:10   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList Haozhong Zhang
2018-03-05 19:14   ` Eric Blake
2018-03-06  0:24     ` Haozhong Zhang
2018-03-06 12:34     ` Igor Mammedov
2018-03-07 10:21   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices Haozhong Zhang
2018-03-07 10:30   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 4/5] tests/bios-tables-test: allow setting extra machine options Haozhong Zhang
2018-03-07 10:40   ` Igor Mammedov
2018-03-05  6:57 ` [Qemu-devel] [PATCH v3 5/5] tests/bios-tables-test: add test cases for DIMM proximity Haozhong Zhang
2018-03-07 12:02   ` Igor Mammedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).