Re: [v2] cxl: prevent read/write to AFU config space while AFU not configured

2017-02-06 Thread Michael Ellerman
Greg KH writes: > On Mon, Feb 06, 2017 at 12:15:59PM +1100, Andrew Donnellan wrote: >> On 27/01/17 11:57, Andrew Donnellan wrote: >> > On 27/01/17 11:40, Michael Ellerman wrote: >> > > Applied to powerpc next, thanks. >> > > >> > > https://git.kernel.org/powerpc/c/14a3ae34bfd0bcb1cc12d55b06a858

Re: [v2] cxl: prevent read/write to AFU config space while AFU not configured

2017-02-06 Thread Greg KH
On Mon, Feb 06, 2017 at 12:15:59PM +1100, Andrew Donnellan wrote: > On 27/01/17 11:57, Andrew Donnellan wrote: > > On 27/01/17 11:40, Michael Ellerman wrote: > > > Applied to powerpc next, thanks. > > > > > > https://git.kernel.org/powerpc/c/14a3ae34bfd0bcb1cc12d55b06a858 > > > > Will fix the rem

Re: [v2] cxl: prevent read/write to AFU config space while AFU not configured

2017-02-05 Thread Andrew Donnellan
On 27/01/17 11:57, Andrew Donnellan wrote: On 27/01/17 11:40, Michael Ellerman wrote: Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/14a3ae34bfd0bcb1cc12d55b06a858 Will fix the remaining locking issue in a follow up patch... Stable team - please make sure this doesn't go

Re: [v2] cxl: prevent read/write to AFU config space while AFU not configured

2017-01-26 Thread Andrew Donnellan
On 27/01/17 11:40, Michael Ellerman wrote: Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/14a3ae34bfd0bcb1cc12d55b06a858 Will fix the remaining locking issue in a follow up patch... -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Aust

Re: [v2] cxl: prevent read/write to AFU config space while AFU not configured

2017-01-26 Thread Michael Ellerman
On Fri, 2016-12-09 at 06:18:50 UTC, Andrew Donnellan wrote: > During EEH recovery, we deconfigure all AFUs whilst leaving the > corresponding vPHB and virtual PCI device in place. > > If something attempts to interact with the AFU's PCI config space (e.g. > running lspci) after the AFU has been de

Re: [PATCH v2] cxl: prevent read/write to AFU config space while AFU not configured

2016-12-12 Thread Andrew Donnellan
It looks like there may still be a recursive locking issue in this patch, please don't merge just yet... On 10/12/16 03:30, Frederic Barrat wrote: +static inline int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn, + struct cxl_afu *afu, int *_record) +{ +

Re: [PATCH v2] cxl: prevent read/write to AFU config space while AFU not configured

2016-12-09 Thread Frederic Barrat
diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c index 3519ace..639a343 100644 --- a/drivers/misc/cxl/vphb.c +++ b/drivers/misc/cxl/vphb.c @@ -76,23 +76,22 @@ static int cxl_pcie_cfg_record(u8 bus, u8 devfn) return (bus << 8) + devfn; } -static int cxl_pcie_config_info(s

[PATCH v2] cxl: prevent read/write to AFU config space while AFU not configured

2016-12-08 Thread Andrew Donnellan
During EEH recovery, we deconfigure all AFUs whilst leaving the corresponding vPHB and virtual PCI device in place. If something attempts to interact with the AFU's PCI config space (e.g. running lspci) after the AFU has been deconfigured and before it's reconfigured, cxl_pcie_{read,write}_config(