From: Haozhong Zhang <haozhong.zhang@intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, Igor Mammedov <imammedo@redhat.com>,
Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
Haozhong Zhang <haozhong.zhang@intel.com>,
dgilbert@redhat.com, David Gibson <david@gibson.dropbear.id.au>,
Alexander Graf <agraf@suse.de>, Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-ppc@nongnu.org
Subject: [Qemu-devel] [PATCH v5 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices
Date: Sun, 11 Mar 2018 09:34:21 +0800 [thread overview]
Message-ID: <20180311013426.32610-1-haozhong.zhang@intel.com> (raw)
(Patch 5 is only for reviewers to run test cases in patch 4)
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 v5:
* (Patch 2) Inline qmp nvdimm info in MemoryDeviceInfo.
Changes in v4:
* (Patch 1) Update the commit message and add R-b from Igor Mammedov.
* (Patch 2) Rebase on misc.json and update the commit message.
* (Patch 3) Directly use di-addr and di-node.
* (Patch 4) Drop the previous v3 patch 3 and add '-machine nvdimm=on'
to parameters of test_acpi_one().
* (Patch 4) Put PC-DIMM and NVDIMM to different numa nodes.
* (Patch 4&5) Move binary blobs of ACPI tables to DO-NOT-APPLY patch 5.
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: make qmp_pc_dimm_device_list() sort devices by address
qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList
hw/acpi-build: build SRAT memory affinity structures for DIMM devices
tests/bios-tables-test: add test cases for DIMM proximity
[DO NOT APPLY] test/acpi-test-data: add ACPI tables for dimmpxm test
hmp.c | 14 ++++--
hw/i386/acpi-build.c | 56 +++++++++++++++++++--
hw/mem/pc-dimm.c | 91 +++++++++++++++++++---------------
hw/ppc/spapr.c | 3 +-
include/hw/mem/pc-dimm.h | 2 +-
numa.c | 23 +++++----
qapi/misc.json | 6 ++-
qmp.c | 7 +--
stubs/qmp_pc_dimm.c | 4 +-
tests/acpi-test-data/pc/APIC.dimmpxm | Bin 0 -> 144 bytes
tests/acpi-test-data/pc/DSDT.dimmpxm | Bin 0 -> 6803 bytes
tests/acpi-test-data/pc/NFIT.dimmpxm | Bin 0 -> 224 bytes
tests/acpi-test-data/pc/SRAT.dimmpxm | Bin 0 -> 472 bytes
tests/acpi-test-data/pc/SSDT.dimmpxm | Bin 0 -> 685 bytes
tests/acpi-test-data/q35/APIC.dimmpxm | Bin 0 -> 144 bytes
tests/acpi-test-data/q35/DSDT.dimmpxm | Bin 0 -> 9487 bytes
tests/acpi-test-data/q35/NFIT.dimmpxm | Bin 0 -> 224 bytes
tests/acpi-test-data/q35/SRAT.dimmpxm | Bin 0 -> 472 bytes
tests/acpi-test-data/q35/SSDT.dimmpxm | Bin 0 -> 685 bytes
tests/bios-tables-test.c | 38 ++++++++++++++
20 files changed, 177 insertions(+), 67 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
next reply other threads:[~2018-03-11 1:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 1:34 Haozhong Zhang [this message]
2018-03-11 1:34 ` [Qemu-devel] [PATCH v5 1/5] pc-dimm: make qmp_pc_dimm_device_list() sort devices by address Haozhong Zhang
2018-03-11 1:34 ` [Qemu-devel] [PATCH v5 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList Haozhong Zhang
2018-03-11 2:31 ` Eric Blake
2018-03-11 3:00 ` Haozhong Zhang
2018-03-11 1:34 ` [Qemu-devel] [PATCH v5 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices Haozhong Zhang
2018-03-11 1:34 ` [Qemu-devel] [PATCH v5 4/5] tests/bios-tables-test: add test cases for DIMM proximity Haozhong Zhang
2018-03-11 1:34 ` [Qemu-devel] [PATCH v5 5/5][DO NOT APPLY] test/acpi-test-data: add ACPI tables for dimmpxm test Haozhong Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180311013426.32610-1-haozhong.zhang@intel.com \
--to=haozhong.zhang@intel.com \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
--cc=xiaoguangrong.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).