mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	Saket Dumbre <saket.dumbre@intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Logan Gunthorpe <logang@deltatee.com>
Cc: linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	Lukas Wunner <lukas@wunner.de>,
	"Natu, Mahesh" <mahesh.natu@intel.com>
Subject: [PATCH RFC 0/7] PCI/HMAT: Describe P2PDMA reachability and performance
Date: Wed, 12 Aug 2026 22:47:37 +0300	[thread overview]
Message-ID: <20260812-hmat-p2p-v1-0-75ac41380585@nvidia.com> (raw)

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.
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@nvidia.com/

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
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@nvidia.com>


             reply	other threads:[~2026-08-12 19:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 19:47 Leon Romanovsky [this message]
2026-08-12 19:47 ` [PATCH RFC 1/7] ACPICA: Define PCIe P2P latency and bandwidth information Leon Romanovsky
2026-08-13 10:13   ` Rafael J. Wysocki (Intel)
2026-08-13 11:01     ` Leon Romanovsky
2026-08-12 19:47 ` [PATCH RFC 2/7] ACPI: HMAT: Make PCIe P2P paths available to consumers Leon Romanovsky
2026-08-12 19:47 ` [PATCH RFC 3/7] PCI/P2PDMA: Authorize HMAT-described cross-host-bridge P2P Leon Romanovsky
2026-08-12 19:47 ` [PATCH RFC 4/7] PCI/P2PDMA: Prefer providers with better HMAT performance Leon Romanovsky
2026-08-14  3:50   ` Logan Gunthorpe
2026-08-16 12:38     ` Leon Romanovsky
2026-08-17 16:09       ` Logan Gunthorpe
2026-08-17 18:27         ` Leon Romanovsky
2026-08-12 19:47 ` [PATCH RFC 5/7] ACPI: HMAT: Add KUnit tests for PCIe P2P matrix semantics Leon Romanovsky
2026-08-12 19:47 ` [PATCH RFC 6/7] PCI/P2PDMA: Add KUnit tests for HMAT policy boundaries Leon Romanovsky
2026-08-12 19:47 ` [PATCH RFC 7/7] PCI/P2PDMA: Add KUnit tests for HMAT provider ranking Leon Romanovsky
2026-08-24 20:15 ` [PATCH RFC 0/7] PCI/HMAT: Describe P2PDMA reachability and performance Alison Schofield
2026-08-24 20:24   ` Natu, Mahesh
2026-08-26 14:08   ` Leon Romanovsky

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=20260812-hmat-p2p-v1-0-75ac41380585@nvidia.com \
    --to=leon@kernel.org \
    --cc=acpica-devel@lists.linux.dev \
    --cc=bhelgaas@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=lukas@wunner.de \
    --cc=mahesh.natu@intel.com \
    --cc=rafael@kernel.org \
    --cc=saket.dumbre@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

all inboxes | Powered by JetHome®