On Wed, Aug 17, 2022 at 09:20:15AM +0800, Lu Baolu wrote:
Some configurations of the PCI fabric will route device originated TLPThis makes it sound like a few unusual configurations will route TLPs
packets based on the memory addresses.
based on memory addresses, but address routing is the default for all
PCIe Memory Requests, and ACS provides a way to override that default.
These configurations are incompatible with PASID as the PASIDI would say "the Requester ID/PASID combination forms a distinct
packets form a distinct address space.
address space."
For instance, any configuration where switches are presentI think your patch actually requires all those features to be not just
without ACS enabled is incompatible.
This enhances the pci_enable_pasid() interface by requiring the ACS to
support Source Validation, Request Redirection, Completer Redirection,
and Upstream Forwarding. This effectively means that devices cannot
spoof their requester ID, requests and completions cannot be redirected,
and all transactions are forwarded upstream, even as it passes through a
bridge where the target device is downstream.
"supported" but actually*enabled* for the entire path leading to the
device.
To use the terms from the spec:
"P2P Request Redirect"
"P2P Completion Redirect"
"Requester ID, Requests, and Completions"
and maybe something like:
... even if the TLP looks like a P2P Request because its memory
address (ignoring the PASID) would fall in a bridge window and would
normally be routed downstream.