Re: [PATCH v4 17/18] PCI: Add KUnit coverage for ACS isolation checks
| Newsgroups | org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <[email protected]> |
> From: Leon Romanovsky <[email protected]> > > Direct Translated P2P and Egress Control both let a peer request reach > the peer without Request Redirect, and whether Request Redirect still > isolates depends further on Translation Blocking and on the flags the > caller requests. Firmware owns these bits, so the combinations are not > reachable on a given machine. > > Drive pci_acs_flags_enabled() with a fake pci_ops supplying the ACS > Control register and check each combination, in both scopes: an > Untranslated-only caller such as pci_enable_pasid() is unaffected by > Direct Translated P2P but still loses Request Redirect to Egress > Control. Cover the two ways the check gives up as well: a device with no > ACS capability, and a control register that cannot be read. > > The function is exposed under CONFIG_KUNIT via VISIBLE_IF_KUNIT. > > Tested-by: Tushar Dave <[email protected]> > Reviewed-by: Logan Gunthorpe <[email protected]> > Assisted-by: Claude:claude-opus-5 > Signed-off-by: Leon Romanovsky <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=17