From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: <imammedo@redhat.com>, <mst@redhat.com>,
Markus Armbruster <armbru@redhat.com>, <qemu-devel@nongnu.org>,
<ankita@nvidia.com>
Cc: <linuxarm@huawei.com>, <linux-cxl@vger.kernel.org>,
<marcel.apfelbaum@gmail.com>, <philmd@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>,
Dave Jiang <dave.jiang@intel.com>,
Huang Ying <ying.huang@intel.com>,
Paolo Bonzini <pbonzini@redhat.com>, <eduardo@habkost.net>,
Michael Roth <michael.roth@amd.com>,
Ani Sinha <anisinha@redhat.com>
Subject: [PATCH v5 00/13] acpi: NUMA nodes for CXL HB as GP + complex NUMA test
Date: Fri, 12 Jul 2024 12:08:04 +0100 [thread overview]
Message-ID: <20240712110837.1439736-1-Jonathan.Cameron@huawei.com> (raw)
v5: Thanks to Igor for review.
Patch 5:
- Add an assert to catch out of range PCI devfn retrieved from addr property
which is oddly an int32_t
Patch 6:
- Push TYPE_ACPI_GENERIC_INTIATOR define down into c file along with
qom_interfaces.h include as they are only needed there.
Patch 7:
- Add missing object class property description.
Patch 8/9:
- Use busnr for naming of of ACPI nodes so as to avoid having to
check if the uid is small enough (it is as they have the same value
but nice not to have to check!)
Patch 10:
- Push TYPE_ACPI_GENERIC_PORT definition down into c file (similar
to patch 6 change.
Title becoming a little misleading as now this does a bunch of other
stuff as precursors, but I've kept it to maintain association with v3 and
before. A more accurate series title is probably
acpi: Rework GI affinity structure generation, add GPs + complex NUMA test.
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 (13):
hw/acpi: Fix ordering of BDF in Generic Initiator PCI Device Handle.
hw/acpi/GI: Fix trivial parameter alignment issue.
hw/acpi: Move AML building code for Generic Initiators to aml_build.c
hw/acpi: Rename build_all_acpi_generic_initiators() to
build_acpi_generic_initiator()
hw/pci: Add a busnr property to pci_props and use for acpi/gi
acpi/pci: Move Generic Initiator object handling into acpi/pci.*
hw/pci-bridge: Add acpi_uid property to TYPE_PXB_BUS
hw/i386/acpi: Use TYPE_PXB_BUS property acpi_uid for DSDT
hw/pci-host/gpex-acpi: Use acpi_uid property.
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 | 34 +++
include/hw/acpi/acpi_generic_initiator.h | 47 ----
include/hw/acpi/aml-build.h | 8 +
include/hw/acpi/pci.h | 3 +
include/hw/pci/pci_bridge.h | 1 +
hw/acpi/acpi_generic_initiator.c | 148 -----------
hw/acpi/aml-build.c | 84 +++++++
hw/acpi/pci.c | 234 ++++++++++++++++++
hw/arm/virt-acpi-build.c | 3 +-
hw/i386/acpi-build.c | 8 +-
hw/pci-bridge/pci_expander_bridge.c | 14 +-
hw/pci-host/gpex-acpi.c | 5 +-
hw/pci/pci.c | 14 ++
tests/qtest/bios-tables-test.c | 97 ++++++++
hw/acpi/meson.build | 1 -
.../data/acpi/x86/q35/APIC.acpihmat-generic-x | Bin 0 -> 136 bytes
.../data/acpi/x86/q35/CEDT.acpihmat-generic-x | Bin 0 -> 68 bytes
.../data/acpi/x86/q35/DSDT.acpihmat-generic-x | Bin 0 -> 10849 bytes
.../data/acpi/x86/q35/HMAT.acpihmat-generic-x | Bin 0 -> 360 bytes
.../data/acpi/x86/q35/SRAT.acpihmat-generic-x | Bin 0 -> 520 bytes
20 files changed, 498 insertions(+), 203 deletions(-)
delete mode 100644 include/hw/acpi/acpi_generic_initiator.h
delete mode 100644 hw/acpi/acpi_generic_initiator.c
create mode 100644 tests/data/acpi/x86/q35/APIC.acpihmat-generic-x
create mode 100644 tests/data/acpi/x86/q35/CEDT.acpihmat-generic-x
create mode 100644 tests/data/acpi/x86/q35/DSDT.acpihmat-generic-x
create mode 100644 tests/data/acpi/x86/q35/HMAT.acpihmat-generic-x
create mode 100644 tests/data/acpi/x86/q35/SRAT.acpihmat-generic-x
--
2.43.0
next reply other threads:[~2024-07-12 11:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 11:08 Jonathan Cameron [this message]
2024-07-12 11:08 ` [PATCH v5 01/13] hw/acpi: Fix ordering of BDF in Generic Initiator PCI Device Handle Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 02/13] hw/acpi/GI: Fix trivial parameter alignment issue Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 03/13] hw/acpi: Move AML building code for Generic Initiators to aml_build.c Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 04/13] hw/acpi: Rename build_all_acpi_generic_initiators() to build_acpi_generic_initiator() Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 05/13] hw/pci: Add a busnr property to pci_props and use for acpi/gi Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 06/13] acpi/pci: Move Generic Initiator object handling into acpi/pci.* Jonathan Cameron
2024-07-15 14:28 ` Igor Mammedov
2024-07-15 14:28 ` Igor Mammedov
2024-07-12 11:08 ` [PATCH v5 07/13] hw/pci-bridge: Add acpi_uid property to TYPE_PXB_BUS Jonathan Cameron
2024-07-15 14:29 ` Igor Mammedov
2024-07-12 11:08 ` [PATCH v5 08/13] hw/i386/acpi: Use TYPE_PXB_BUS property acpi_uid for DSDT Jonathan Cameron
2024-07-15 14:29 ` Igor Mammedov
2024-07-12 11:08 ` [PATCH v5 09/13] hw/pci-host/gpex-acpi: Use acpi_uid property Jonathan Cameron
2024-07-15 14:29 ` Igor Mammedov
2024-07-12 11:08 ` [PATCH v5 10/13] hw/acpi: Generic Port Affinity Structure support Jonathan Cameron
2024-07-15 14:48 ` Igor Mammedov
2024-07-17 15:02 ` Jonathan Cameron
2024-07-17 15:11 ` Michael S. Tsirkin
2024-07-17 15:40 ` Jonathan Cameron
2024-08-28 16:54 ` Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 11/13] bios-tables-test: Allow for new acpihmat-generic-x test data Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 12/13] bios-tables-test: Add complex SRAT / HMAT test for GI GP Jonathan Cameron
2024-07-12 11:08 ` [PATCH v5 13/13] bios-tables-test: Add data for complex numa test (GI, GP etc) Jonathan Cameron
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=20240712110837.1439736-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=richard.henderson@linaro.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