Re: [PATCH v4 07/11] PCI: liveupdate: Inherit ACS flags in incoming preserved devices

David Matlack
2026-05-04T17:24:15Z

On Thu, Apr 23, 2026 at 2:23 PM David Matlack <dmatlack@google.com> wrote:
>
> Inherit Access Control Services (ACS) flags on all incoming preserved
> devices (endpoints and upstream bridges) during a Live Update.
>
> Inheriting ACS flags avoids changing routing rules while memory
> transactions are in flight from preserved devices. This is also strictly
> necessary to ensure that IOMMU group assignments do not change across
> a Live Update for preserved devices, as changing ACS configurations can
> split or merge IOMMU groups.
>
> Signed-off-by: David Matlack <dmatlack@google.com>

> @@ -1017,6 +1017,15 @@ void pci_enable_acs(struct pci_dev *dev)
> bool enable_acs = false;
> int pos;
>
> + /*
> + * ACS flags must be inherited from the previous kernel during a Live
> + * Update for preserved devices (which includes endpoints and any
> + * upstream bridges) to avoid changing routing while memory transactions
> + * are in flight.
> + */
> + if (pci_liveupdate_incoming(dev))
> + return;

Sashiko caught that pci_enable_acs() is also called from
pci_restore_state() so this patch needs a fix to ensure that ACS flags
do not change or get lost after a save+reset+restore.