Re: [PATCH RFC 0/7] PCI/HMAT: Describe P2PDMA reachability and performance

From: Natu, Mahesh

Date: Mon Aug 24 2026 - 16:26:44 EST


attached

Thank you,

Mahesh

 


From: Schofield, Alison <alison.schofield@xxxxxxxxx>
Sent: Monday, August 24, 2026 1:15 PM
To: Leon Romanovsky <leon@xxxxxxxxxx>
Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx>; Len Brown <lenb@xxxxxxxxxx>; Saket Dumbre <saket.dumbre@xxxxxxxxx>; Bjorn Helgaas <bhelgaas@xxxxxxxxxx>; Logan Gunthorpe <logang@xxxxxxxxxxxx>; linux-acpi@xxxxxxxxxxxxxxx <linux-acpi@xxxxxxxxxxxxxxx>; acpica-devel@xxxxxxxxxxxxxxx <acpica-devel@xxxxxxxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx <linux-kernel@xxxxxxxxxxxxxxx>; linux-pci@xxxxxxxxxxxxxxx <linux-pci@xxxxxxxxxxxxxxx>; Lukas Wunner <lukas@xxxxxxxxx>; Natu, Mahesh <mahesh.natu@xxxxxxxxx>
Subject: Re: [PATCH RFC 0/7] PCI/HMAT: Describe P2PDMA reachability and performance
 
On Wed, Aug 12, 2026 at 10:47:37PM +0300, Leon Romanovsky wrote:
> Linux derives P2PDMA reachability from visible PCI topology, ACS
> configuration, and a host-bridge whitelist. It cannot describe conditional
> or slower cross-host-bridge paths; passthrough can hide the physical peer
> relationships.
>
> This RFC series implements the proposed ACPI HMAT Type 3 extension below.

Hi Leon,

Is there an ECN document for review alongside this?
I get that the table below is a snapshot of the expected change, but
would appreciate the long version to read.

Please add linux-cxl to CC list on future postings.

-- Alison


> Directional Generic Port matrices describe reachability, ordering, latency,
> and bandwidth. Linux uses ordered paths to authorize P2PDMA and their
> latency/bandwidth to rank providers. A VMM could translate these matrices
> into guest domains; that is outside this series.
>
>   HMAT Type 3 structure
>
>   Field               Offset       Bytes  Meaning
>   ---------------------------------------------------------------
>   Type:                    0           2  value 3
>   Length:                  4           4  entire structure
>   Flags:                   8           1  traffic classes
>   Data-type:               9           1  metric selector
>   Initiators:             12           4  Generic Port count (s)
>   Targets:                16           4  Generic Port count (t)
>   Base-unit:              24           8  ps or MB/s; non-zero
>   Initiator-PDs:          32         4*s  proximity-domain list
>   Target-PDs:         32+4*s         4*t  proximity-domain list
>   Matrix:         32+4*(s+t)       2*s*t  directional Entry[i][j]
>   Reserved: bytes 2-3, 10-11, and 20-23
>
>   Flags: encoding
>     bit 0  non-UIO
>     bit 1  UIO
>
>   Metrics: selector
>     0/1/2  access/read/write latency
>     3/4/5  access/read/write bandwidth
>
>   Direction: Initiator PD[i] -- Entry[i][j] metric --> Target PD[j]
>
> ----------------------------------------------------------------------
> Based on [PATCH v3 00/17] PCI/P2PDMA: Fix ACS egress control handling
> https://lore.kernel.org/all/20260811-fix-p2p-acs-v3-0-efc488ee7c03@xxxxxxxxxx/
>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
> ---
> Leon Romanovsky (7):
>       ACPICA: Define PCIe P2P latency and bandwidth information
>       ACPI: HMAT: Make PCIe P2P paths available to consumers
>       PCI/P2PDMA: Authorize HMAT-described cross-host-bridge P2P
>       PCI/P2PDMA: Prefer providers with better HMAT performance
>       ACPI: HMAT: Add KUnit tests for PCIe P2P matrix semantics
>       PCI/P2PDMA: Add KUnit tests for HMAT policy boundaries
>       PCI/P2PDMA: Add KUnit tests for HMAT provider ranking
>
>  drivers/acpi/numa/Kconfig     |  13 ++
>  drivers/acpi/numa/Makefile    |   1 +
>  drivers/acpi/numa/hmat.c      | 245 +++++++++++++++++++++-
>  drivers/acpi/numa/hmat_test.c | 223 ++++++++++++++++++++
>  drivers/acpi/numa/hmat_test.h |  17 ++
>  drivers/pci/Kconfig           |  14 ++
>  drivers/pci/Makefile          |   1 +
>  drivers/pci/p2pdma.c          | 300 ++++++++++++++++++++------
>  drivers/pci/p2pdma_test.c     | 477 ++++++++++++++++++++++++++++++++++++++++++
>  drivers/pci/pci.h             |  23 ++
>  include/acpi/actbl1.h         |  27 ++-
>  include/linux/acpi.h          |  26 +++
>  12 files changed, 1298 insertions(+), 69 deletions(-)
> ---
> base-commit: bc5261fca94dd94ab557cc0852ce465d9c3ab8b0
> change-id: 20260715-hmat-p2p-eb4971a9d731
>
> Best regards,
> -- 
> Leon Romanovsky <leonro@xxxxxxxxxx>
>

Attachment: HMAT Extensions for PCIe P2P - external.docx
Description: HMAT Extensions for PCIe P2P - external.docx