Skip to content

ACPI: VIOT: Fix ACS setup

Eric Auger requested to merge eauger1/centos-stream-9:viot_acs_fix into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2101431 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Test: With multifunction root ports

Currently acpi_viot_init() gets called after the pci device has been scanned and pci_enable_acs() has been called. So pci_request_acs() fails to be taken into account leading to wrong single iommu group topologies when dealing with multi-function root ports for instance.

We cannot simply move the acpi_viot_init() earlier, similarly as the IORT init because the VIOT parsing relies on the pci scan. However we can detect VIOT is present earlier and in such a case, request ACS. Introduce a new acpi_viot_early_init() routine that allows to call pci_request_acs() before the scan.

While at it, guard the call to pci_request_acs() with #ifdef CONFIG_PCI.

Signed-off-by: Eric Auger eric.auger@redhat.com

v1 -> v2:

  • add the Upstream Status in the commit and also reference linux-next instead of Rafael's git
Edited by Eric Auger

Merge request reports