From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: <ankita@nvidia.com>, <marcel.apfelbaum@gmail.com>,
<philmd@linaro.org>, <mst@redhat.com>, <qemu-devel@nongnu.org>
Cc: Dave Jiang <dave.jiang@intel.com>,
Huang Ying <ying.huang@intel.com>,
Paolo Bonzini <pbonzini@redhat.com>, <eduardo@habkost.net>,
<imammedo@redhat.com>, <linux-cxl@vger.kernel.org>,
<linuxarm@huawei.com>, Markus Armbruster <armbru@redhat.com>,
Michael Roth <michael.roth@amd.com>,
Ani Sinha <anisinha@redhat.com>
Subject: [PATCH 0/6 qemu] acpi: NUMA nodes for CXL HB as GP + complex NUMA test.
Date: Wed, 3 Apr 2024 11:29:21 +0100 [thread overview]
Message-ID: <20240403102927.31263-1-Jonathan.Cameron@huawei.com> (raw)
ACPI 6.5 introduced Generic Port Affinity Structures to close a system
description gap that was a problem for CXL memory systems.
It defines an new SRAT Affinity structure (and hence allows creation of an
ACPI Proximity Node which can only be defined via an SRAT structure)
for the boundary between a discoverable fabric and a non discoverable
system interconnects etc.
The HMAT data on latency and bandwidth is combined with discoverable
information from the CXL bus (link speeds, lane counts) and CXL devices
(switch port to port characteristics and USP to memory, via CDAT tables
read from the device). QEMU has supported the rest of the elements
of this chain for a while but now the kernel has caught up and we need
the missing element of Generic Ports (this code has been used extensively
in testing and debugging that kernel support, some resulting fixes
currently under review).
Generic Port Affinity Structures are very similar to the recently
added Generic Initiator Affinity Structures (GI) so this series
factors out and reuses much of that infrastructure for reuse
There are subtle differences (beyond the obvious structure ID change).
- The ACPI spec example (and linux kernel support) has a Generic
Port not as associated with the CXL root port, but rather with
the CXL Host bridge. As a result, an ACPI handle is used (rather
than the PCI SBDF option for GIs). In QEMU the easiest way
to get to this is to target the root bridge PCI Bus, and
conveniently the root bridge bus number is used for the UID allowing
us to construct an appropriate entry.
A key addition of this series is a complex NUMA topology example that
stretches the QEMU emulation code for GI, GP and nodes with just
CPUS, just memory, just hot pluggable memory, mixture of memory and CPUs.
A similar test showed up a few NUMA related bugs with fixes applied for
9.0 (note that one of these needs linux booted to identify that it
rejects the HMAT table and this test is a regression test for the
table generation only).
https://lore.kernel.org/qemu-devel/2eb6672cfdaea7dacd8e9bb0523887f13b9f85ce.1710282274.git.mst@redhat.com/
https://lore.kernel.org/qemu-devel/74e2845c5f95b0c139c79233ddb65bb17f2dd679.1710282274.git.mst@redhat.com/
Jonathan Cameron (6):
hw/acpi/GI: Fix trivial parameter alignment issue.
hw/acpi: Insert an acpi-generic-node base under acpi-generic-initiator
hw/acpi: Generic Port Affinity Structure support
bios-tables-test: Allow for new acpihmat-generic-x test data.
bios-tables-test: Add complex SRAT / HMAT test for GI GP
bios-tables-test: Add data for complex numa test (GI, GP etc)
qapi/qom.json | 18 ++
include/hw/acpi/acpi_generic_initiator.h | 33 +++-
include/hw/pci/pci_bridge.h | 1 +
hw/acpi/acpi_generic_initiator.c | 199 ++++++++++++++------
hw/pci-bridge/pci_expander_bridge.c | 1 -
tests/qtest/bios-tables-test.c | 92 +++++++++
tests/data/acpi/q35/APIC.acpihmat-generic-x | Bin 0 -> 136 bytes
tests/data/acpi/q35/CEDT.acpihmat-generic-x | Bin 0 -> 68 bytes
tests/data/acpi/q35/DSDT.acpihmat-generic-x | Bin 0 -> 10400 bytes
tests/data/acpi/q35/HMAT.acpihmat-generic-x | Bin 0 -> 360 bytes
tests/data/acpi/q35/SRAT.acpihmat-generic-x | Bin 0 -> 520 bytes
11 files changed, 285 insertions(+), 59 deletions(-)
create mode 100644 tests/data/acpi/q35/APIC.acpihmat-generic-x
create mode 100644 tests/data/acpi/q35/CEDT.acpihmat-generic-x
create mode 100644 tests/data/acpi/q35/DSDT.acpihmat-generic-x
create mode 100644 tests/data/acpi/q35/HMAT.acpihmat-generic-x
create mode 100644 tests/data/acpi/q35/SRAT.acpihmat-generic-x
--
2.39.2
next reply other threads:[~2024-04-03 10:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 10:29 Jonathan Cameron [this message]
2024-04-03 10:29 ` [PATCH 1/6] hw/acpi/GI: Fix trivial parameter alignment issue Jonathan Cameron
2024-04-08 2:58 ` Ankit Agrawal
2024-04-03 10:29 ` [PATCH 2/6] hw/acpi: Insert an acpi-generic-node base under acpi-generic-initiator Jonathan Cameron
2024-04-03 10:29 ` [PATCH 3/6] hw/acpi: Generic Port Affinity Structure support Jonathan Cameron
2024-04-23 10:56 ` Markus Armbruster
2024-04-29 17:50 ` Jonathan Cameron
2024-04-30 6:55 ` Markus Armbruster
2024-04-30 10:43 ` Jonathan Cameron
2024-06-04 12:06 ` Markus Armbruster
2024-06-04 13:42 ` Jonathan Cameron
2024-04-03 10:29 ` [PATCH 4/6] bios-tables-test: Allow for new acpihmat-generic-x test data Jonathan Cameron
2024-04-03 10:29 ` [PATCH 5/6] bios-tables-test: Add complex SRAT / HMAT test for GI GP Jonathan Cameron
2024-04-03 10:29 ` [PATCH 6/6] bios-tables-test: Add data for complex numa test (GI, GP etc) Jonathan Cameron
2024-04-12 7:39 ` [PATCH 0/6 qemu] acpi: NUMA nodes for CXL HB as GP + complex NUMA test Huang, Ying
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=20240403102927.31263-1-Jonathan.Cameron@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=anisinha@redhat.com \
--cc=ankita@nvidia.com \
--cc=armbru@redhat.com \
--cc=dave.jiang@intel.com \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=ying.huang@intel.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 read-only IMAP folder(s) and NNTP newsgroup(s).