Re: [PATCH v8 08/12] PCI: liveupdate: Adopt ACS controls in incoming preserved devices
From: David Matlack
Date: Mon Sep 14 2026 - 14:17:28 EST
On 2026-09-11 06:31 PM, David Matlack wrote:
> On 2026-09-10 06:51 PM, Bjorn Helgaas wrote:
>
> > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> > > index 77b17b13ee61..22001bdf4c97 100644
> > > --- a/drivers/pci/pci.c
> > > +++ b/drivers/pci/pci.c
> > > @@ -34,6 +34,8 @@
> > > #include <linux/aer.h>
> > > #include <linux/bitfield.h>
> > > #include <linux/suspend.h>
> > > +
> > > +#include "liveupdate.h"
> > > #include "pci.h"
> > >
> > > DEFINE_MUTEX(pci_slot_mutex);
> > > @@ -1008,6 +1010,9 @@ void pci_enable_acs(struct pci_dev *dev)
> > > bool enable_acs = false;
> > > int pos;
> > >
> > > + if (!pci_liveupdate_enable_adopted_acs_controls(dev))
> > > + return;
> >
> > Ugh. The asymmetry between pci_save_state(), which does nothing
> > ACS-related, and pci_restore_state(), which enables it, is sort of
> > sketchy to begin with.
> >
> > The command-line parsing in this path feels like kind of a wart (not
> > that you're touching it).
> >
> > It just seems like this path is already hard to analyze, and
> > liveupdate is making it harder.
> >
> > If we could save/restore the ACS state around the reset, wouldn't that
> > solve this without any liveupdate specials here?
>
> Yeah that would simplify the liveupdate support greatly. Let me work on
> that for v9.
Here's the patch I have prepped for v9 to save/restore ACS controls
around reset: