Re: [PATCH v2] PCI: Add ID@path device format for pci= parameters

From: Logan Gunthorpe

Date: Thu Nov 12 2026 - 22:27:51 EST




On 2026-11-11 5:36 p.m., Ben Cressey wrote:
> The <pci_dev> grammar shared by pci=resource_alignment=,
> pci=disable_acs_redir= and pci=config_acs= names a device either by
> address, with an optional path, or by ID. When one command line serves
> more than one platform, neither form limits an entry to the intended
> device: an address applies to whatever occupies it on each platform, and
> an ID applies to every instance, such as all Downstream Ports of a
> switch rather than the one that needs different ACS settings.
>
> Accept pci:<vendor>:<device>[:<subvendor>:<subdevice>]@<path>, where
> <path> is the address format, and match only when both halves match. An
> entry written for one platform is then inert on another where that
> address holds a different device. For example,
>
> pci=config_acs=xx111x1@pci:10b5:8749@0000:80:02.0/00.0/08.0
>
> configures ACS on the Downstream Port at that path only if it is a
> PEX 8749 port.
>
> The path goes last since pci_dev_str_match_path() consumes up to the
> next ';'. The IDs are compared first, and the path is parsed only for a
> device that matches them. The <order>@ and <flags>@ prefixes of
> resource_alignment and config_acs are stripped before
> pci_dev_str_match() is called, so the callers are unchanged.
>
> Suggested-by: Wei Wang <wei.w.wang@xxxxxxxxxxx>
> Signed-off-by: Ben Cressey <ben@xxxxxxxxxxx>
Looks pretty straightforward and the reasoning all makes sense to me.

Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>