[GIT PULL] VFIO updates for v4.19-rc1

2018-08-16 Thread Alex Williamson
to 0dd0e297f0ec780b6b3484ba38b27d18c8ca7af9: vfio-pci: Disable binding to PFs with SR-IOV enabled (2018-08-06 12:23:19 -0600) VFIO updates for v4.19 - Mark switch fall throughs (Gustavo A. R. Silva) - Disable binding SR-IOV enabled PFs (Alex Williamson

[GIT PULL] VFIO updates for v4.19-rc1

2018-08-16 Thread Alex Williamson
to 0dd0e297f0ec780b6b3484ba38b27d18c8ca7af9: vfio-pci: Disable binding to PFs with SR-IOV enabled (2018-08-06 12:23:19 -0600) VFIO updates for v4.19 - Mark switch fall throughs (Gustavo A. R. Silva) - Disable binding SR-IOV enabled PFs (Alex Williamson

[PATCH v4 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-08-09 Thread Alex Williamson
controller) prior to FLR. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1542494 Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 83 ++ 1 file changed, 83 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index

[PATCH v4 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-08-09 Thread Alex Williamson
controller) prior to FLR. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1542494 Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 83 ++ 1 file changed, 83 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index

[PATCH v4 3/3] PCI: Intel DC P3700 NVMe delay after FLR quirk

2018-08-09 Thread Alex Williamson
this with a device specific reset quirk to add an additional, heuristically determined, delay after the FLR completes. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1592654 Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 22 ++ 1 file changed, 22 insertions(+) diff

[PATCH v4 3/3] PCI: Intel DC P3700 NVMe delay after FLR quirk

2018-08-09 Thread Alex Williamson
this with a device specific reset quirk to add an additional, heuristically determined, delay after the FLR completes. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1592654 Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 22 ++ 1 file changed, 22 insertions(+) diff

[PATCH v4 1/3] PCI: Export pcie_has_flr()

2018-08-09 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

[PATCH v4 1/3] PCI: Export pcie_has_flr()

2018-08-09 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

[PATCH v4 0/3] PCI: NVMe reset quirks

2018-08-09 Thread Alex Williamson
behavior can also use. Thanks, Alex --- Alex Williamson (3): PCI: Export pcie_has_flr() PCI: Samsung SM961/PM961 NVMe disable before FLR quirk PCI: Intel DC P3700 NVMe delay after FLR quirk drivers/pci/pci.c|3 + drivers/pci/quirks.c | 105

[PATCH v4 0/3] PCI: NVMe reset quirks

2018-08-09 Thread Alex Williamson
behavior can also use. Thanks, Alex --- Alex Williamson (3): PCI: Export pcie_has_flr() PCI: Samsung SM961/PM961 NVMe disable before FLR quirk PCI: Intel DC P3700 NVMe delay after FLR quirk drivers/pci/pci.c|3 + drivers/pci/quirks.c | 105

Re: [PATCH] vfio: Mark expected switch fall-throughs

2018-08-07 Thread Alex Williamson
On Mon, 9 Jul 2018 17:53:09 -0500 "Gustavo A. R. Silva" wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva > --- > drivers/vfio/pci/vfio_pci.c | 2 +- >

Re: [PATCH] vfio: Mark expected switch fall-throughs

2018-08-07 Thread Alex Williamson
On Mon, 9 Jul 2018 17:53:09 -0500 "Gustavo A. R. Silva" wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva > --- > drivers/vfio/pci/vfio_pci.c | 2 +- >

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-08-01 Thread Alex Williamson
On Wed, 1 Aug 2018 23:28:53 +0530 Srinath Mannam wrote: > Hi Alex, > > In user space UIO driver (DPDK) implementation, sysfs interface > "/sys/devices/pci/.../resource0_wc" is used to map prefetchable PCI > resources as WC. > Platforms which support write-combining maps of PCI resources have >

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-08-01 Thread Alex Williamson
On Wed, 1 Aug 2018 23:28:53 +0530 Srinath Mannam wrote: > Hi Alex, > > In user space UIO driver (DPDK) implementation, sysfs interface > "/sys/devices/pci/.../resource0_wc" is used to map prefetchable PCI > resources as WC. > Platforms which support write-combining maps of PCI resources have >

Re: [PATCH v3 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-07-24 Thread Alex Williamson
On Wed, 25 Jul 2018 04:53:18 +0900 Minwoo Im wrote: > Hi Alex, > > On Tue, 2018-07-24 at 10:14 -0600, Alex Williamson wrote: > > The Samsung SM961/PM961 (960 EVO) sometimes fails to return from FLR > > with the PCI config space reading back as -1.  A reproducible instance

Re: [PATCH v3 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-07-24 Thread Alex Williamson
On Wed, 25 Jul 2018 04:53:18 +0900 Minwoo Im wrote: > Hi Alex, > > On Tue, 2018-07-24 at 10:14 -0600, Alex Williamson wrote: > > The Samsung SM961/PM961 (960 EVO) sometimes fails to return from FLR > > with the PCI config space reading back as -1.  A reproducible instance

Re: [PATCH v3 3/3] PCI: Intel DC P3700 NVMe delay after FLR quirk

2018-07-24 Thread Alex Williamson
On Tue, 24 Jul 2018 10:14:46 -0600 Alex Williamson wrote: > Add a device specific reset for Intel DC P3700 NVMe device which > exhibits a timeout failure in drivers waiting for the ready status to > update after NVMe enable if the driver interacts with the device too > quick

Re: [PATCH v3 3/3] PCI: Intel DC P3700 NVMe delay after FLR quirk

2018-07-24 Thread Alex Williamson
On Tue, 24 Jul 2018 10:14:46 -0600 Alex Williamson wrote: > Add a device specific reset for Intel DC P3700 NVMe device which > exhibits a timeout failure in drivers waiting for the ready status to > update after NVMe enable if the driver interacts with the device too > quick

[PATCH v3 0/3] PCI: NVMe reset quirks

2018-07-24 Thread Alex Williamson
after FLR, which clearly any device needing similar behavior can also use. Thanks, Alex --- Alex Williamson (3): PCI: Export pcie_has_flr() PCI: Samsung SM961/PM961 NVMe disable before FLR quirk PCI: Intel DC P3700 NVMe delay after FLR quirk drivers/pci/pci.c|3

[PATCH v3 0/3] PCI: NVMe reset quirks

2018-07-24 Thread Alex Williamson
after FLR, which clearly any device needing similar behavior can also use. Thanks, Alex --- Alex Williamson (3): PCI: Export pcie_has_flr() PCI: Samsung SM961/PM961 NVMe disable before FLR quirk PCI: Intel DC P3700 NVMe delay after FLR quirk drivers/pci/pci.c|3

[PATCH v3 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-07-24 Thread Alex Williamson
controller) prior to FLR. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 83 ++ 1 file changed, 83 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e72c8742aafa..3899cdd2514b 100644 --- a/drivers/pci/quirks.c

[PATCH v3 3/3] PCI: Intel DC P3700 NVMe delay after FLR quirk

2018-07-24 Thread Alex Williamson
this with a device specific reset quirk to add an additional, heuristically determined, delay after the FLR completes. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index

[PATCH v3 1/3] PCI: Export pcie_has_flr()

2018-07-24 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

[PATCH v3 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-07-24 Thread Alex Williamson
controller) prior to FLR. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 83 ++ 1 file changed, 83 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e72c8742aafa..3899cdd2514b 100644 --- a/drivers/pci/quirks.c

[PATCH v3 3/3] PCI: Intel DC P3700 NVMe delay after FLR quirk

2018-07-24 Thread Alex Williamson
this with a device specific reset quirk to add an additional, heuristically determined, delay after the FLR completes. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index

[PATCH v3 1/3] PCI: Export pcie_has_flr()

2018-07-24 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

Re: [PATCH v2 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 19:20:41 -0700 Sinan Kaya wrote: > On 7/23/18, Alex Williamson wrote: > > On Mon, 23 Jul 2018 17:40:02 -0700 > > Sinan Kaya wrote: > > > >> On 7/23/2018 5:13 PM, Alex Williamson wrote: > >> > + * The NVMe specification

Re: [PATCH v2 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 19:20:41 -0700 Sinan Kaya wrote: > On 7/23/18, Alex Williamson wrote: > > On Mon, 23 Jul 2018 17:40:02 -0700 > > Sinan Kaya wrote: > > > >> On 7/23/2018 5:13 PM, Alex Williamson wrote: > >> > + * The NVMe specification

Re: [PATCH v2 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 17:40:02 -0700 Sinan Kaya wrote: > On 7/23/2018 5:13 PM, Alex Williamson wrote: > > + * The NVMe specification requires that controllers support PCIe FLR, but > > + * but some Samsung SM961/PM961 controllers fail to recover after FLR (-1 > > + *

Re: [PATCH v2 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 17:40:02 -0700 Sinan Kaya wrote: > On 7/23/2018 5:13 PM, Alex Williamson wrote: > > + * The NVMe specification requires that controllers support PCIe FLR, but > > + * but some Samsung SM961/PM961 controllers fail to recover after FLR (-1 > > + *

[PATCH v2 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
PCIe FLR support, we can apply this quirk to all devices with matching class code. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1592654 Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 118 ++ 1 file changed, 118 insertions(+) diff

[PATCH v2 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
PCIe FLR support, we can apply this quirk to all devices with matching class code. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1592654 Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 118 ++ 1 file changed, 118 insertions(+) diff

[PATCH v2 0/2] PCI: NVMe reset quirk

2018-07-23 Thread Alex Williamson
quirk for all NVMe class devices so that we can try to get reliable behavior from them for device assignment and any other users of the PCI subsystem reset interface. Patches against current PCI next branch. Thanks, Alex --- Alex Williamson (2): PCI: Export pcie_has_flr() PCI: NVMe

[PATCH v2 0/2] PCI: NVMe reset quirk

2018-07-23 Thread Alex Williamson
quirk for all NVMe class devices so that we can try to get reliable behavior from them for device assignment and any other users of the PCI subsystem reset interface. Patches against current PCI next branch. Thanks, Alex --- Alex Williamson (2): PCI: Export pcie_has_flr() PCI: NVMe

[PATCH v2 1/2] PCI: Export pcie_has_flr()

2018-07-23 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

[PATCH v2 1/2] PCI: Export pcie_has_flr()

2018-07-23 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

Re: [PATCH 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 17:45:33 -0500 Bjorn Helgaas wrote: > On Mon, Jul 23, 2018 at 04:24:31PM -0600, Alex Williamson wrote: > > Take advantage of NVMe devices using a standard interface to quiesce > > the controller prior to reset, including device specific delays before > >

Re: [PATCH 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 17:45:33 -0500 Bjorn Helgaas wrote: > On Mon, Jul 23, 2018 at 04:24:31PM -0600, Alex Williamson wrote: > > Take advantage of NVMe devices using a standard interface to quiesce > > the controller prior to reset, including device specific delays before > >

Re: [PATCH 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 16:45:08 -0600 Keith Busch wrote: > On Mon, Jul 23, 2018 at 04:24:31PM -0600, Alex Williamson wrote: > > Take advantage of NVMe devices using a standard interface to quiesce > > the controller prior to reset, including device specific delays before > >

Re: [PATCH 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
On Mon, 23 Jul 2018 16:45:08 -0600 Keith Busch wrote: > On Mon, Jul 23, 2018 at 04:24:31PM -0600, Alex Williamson wrote: > > Take advantage of NVMe devices using a standard interface to quiesce > > the controller prior to reset, including device specific delays before > >

[PATCH 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
PCIe FLR support, we can apply this quirk to all devices with matching class code. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 112 ++ 1 file changed, 112 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index

[PATCH 1/2] PCI: Export pcie_has_flr()

2018-07-23 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

[PATCH 0/2] PCI: NVMe reset quirk

2018-07-23 Thread Alex Williamson
reliable behavior from them for device assignment and any other users of the PCI subsystem reset interface. Patches against current PCI next branch. Thanks, Alex --- Alex Williamson (2): PCI: Export pcie_has_flr() PCI: NVMe device specific reset quirk drivers/pci/pci.c|3

[PATCH 1/2] PCI: Export pcie_has_flr()

2018-07-23 Thread Alex Williamson
pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is present prior to calling. pcie_flr() is exported while pcie_has_flr() is not. Resolve this. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |3 ++- include/linux/pci.h |1 + 2 files changed, 3 insertions

[PATCH 0/2] PCI: NVMe reset quirk

2018-07-23 Thread Alex Williamson
reliable behavior from them for device assignment and any other users of the PCI subsystem reset interface. Patches against current PCI next branch. Thanks, Alex --- Alex Williamson (2): PCI: Export pcie_has_flr() PCI: NVMe device specific reset quirk drivers/pci/pci.c|3

[PATCH 2/2] PCI: NVMe device specific reset quirk

2018-07-23 Thread Alex Williamson
PCIe FLR support, we can apply this quirk to all devices with matching class code. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 112 ++ 1 file changed, 112 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index

[GIT PULL] VFIO fixes for v4.18-rc6

2018-07-20 Thread Alex Williamson
Hi Linus, The following changes since commit 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe: Linux 4.18-rc5 (2018-07-15 12:49:31 -0700) are available in the Git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v4.18-rc6 for you to fetch changes up to

[GIT PULL] VFIO fixes for v4.18-rc6

2018-07-20 Thread Alex Williamson
Hi Linus, The following changes since commit 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe: Linux 4.18-rc5 (2018-07-15 12:49:31 -0700) are available in the Git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v4.18-rc6 for you to fetch changes up to

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-20 Thread Alex Williamson
On Thu, 19 Jul 2018 21:49:48 +0530 Srinath Mannam wrote: > HI Alex, > > On Thu, Jul 19, 2018 at 8:42 PM, Alex Williamson > wrote: > > On Thu, 19 Jul 2018 20:17:11 +0530 > > Srinath Mannam wrote: > > > >> HI Alex, > >> > >> On

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-20 Thread Alex Williamson
On Thu, 19 Jul 2018 21:49:48 +0530 Srinath Mannam wrote: > HI Alex, > > On Thu, Jul 19, 2018 at 8:42 PM, Alex Williamson > wrote: > > On Thu, 19 Jul 2018 20:17:11 +0530 > > Srinath Mannam wrote: > > > >> HI Alex, > >> > >> On

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-19 Thread Alex Williamson
On Thu, 19 Jul 2018 20:17:11 +0530 Srinath Mannam wrote: > HI Alex, > > On Thu, Jul 19, 2018 at 2:55 AM, Alex Williamson > wrote: > > On Thu, 19 Jul 2018 00:05:18 +0530 > > Srinath Mannam wrote: > > > >> Hi Alex, > >> > >> On

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-19 Thread Alex Williamson
On Thu, 19 Jul 2018 20:17:11 +0530 Srinath Mannam wrote: > HI Alex, > > On Thu, Jul 19, 2018 at 2:55 AM, Alex Williamson > wrote: > > On Thu, 19 Jul 2018 00:05:18 +0530 > > Srinath Mannam wrote: > > > >> Hi Alex, > >> > >> On

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-18 Thread Alex Williamson
On Thu, 19 Jul 2018 00:05:18 +0530 Srinath Mannam wrote: > Hi Alex, > > On Tue, Jul 17, 2018 at 8:52 PM, Alex Williamson > wrote: > > On Fri, 13 Jul 2018 10:26:17 +0530 > > Srinath Mannam wrote: > > > >> By default all BARs map with VMA acce

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-18 Thread Alex Williamson
On Thu, 19 Jul 2018 00:05:18 +0530 Srinath Mannam wrote: > Hi Alex, > > On Tue, Jul 17, 2018 at 8:52 PM, Alex Williamson > wrote: > > On Fri, 13 Jul 2018 10:26:17 +0530 > > Srinath Mannam wrote: > > > >> By default all BARs map with VMA acce

Re: [PATCH] vfio/pci: Fix potential Spectre v1

2018-07-18 Thread Alex Williamson
On Tue, 17 Jul 2018 12:39:00 -0500 "Gustavo A. R. Silva" wrote: > info.index can be indirectly controlled by user-space, hence leading > to a potential exploitation of the Spectre variant 1 vulnerability. > > This issue was detected with the help of Smatch: > > drivers/vfio/pci/vfio_pci.c:734

Re: [PATCH] vfio/pci: Fix potential Spectre v1

2018-07-18 Thread Alex Williamson
On Tue, 17 Jul 2018 12:39:00 -0500 "Gustavo A. R. Silva" wrote: > info.index can be indirectly controlled by user-space, hence leading > to a potential exploitation of the Spectre variant 1 vulnerability. > > This issue was detected with the help of Smatch: > > drivers/vfio/pci/vfio_pci.c:734

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-17 Thread Alex Williamson
On Fri, 13 Jul 2018 10:26:17 +0530 Srinath Mannam wrote: > By default all BARs map with VMA access permissions > as pgprot_noncached. > > In ARM64 pgprot_noncached is MT_DEVICE_nGnRnE which > is strongly ordered and allows aligned access. > This type of mapping works for NON-PREFETCHABLE bars >

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-17 Thread Alex Williamson
On Fri, 13 Jul 2018 10:26:17 +0530 Srinath Mannam wrote: > By default all BARs map with VMA access permissions > as pgprot_noncached. > > In ARM64 pgprot_noncached is MT_DEVICE_nGnRnE which > is strongly ordered and allows aligned access. > This type of mapping works for NON-PREFETCHABLE bars >

[GIT PULL] VFIO fixes for v4.18-rc5

2018-07-13 Thread Alex Williamson
Hi Linus, The following changes since commit 1e4b044d22517cae7047c99038abb23243ca: Linux 4.18-rc4 (2018-07-08 16:34:02 -0700) are available in the Git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v4.18-rc5 for you to fetch changes up to

[GIT PULL] VFIO fixes for v4.18-rc5

2018-07-13 Thread Alex Williamson
Hi Linus, The following changes since commit 1e4b044d22517cae7047c99038abb23243ca: Linux 4.18-rc4 (2018-07-08 16:34:02 -0700) are available in the Git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v4.18-rc5 for you to fetch changes up to

[PATCH] vfio-pci: Disable binding to PFs with SR-IOV enabled

2018-07-12 Thread Alex Williamson
can resolve this by re-binding to the host driver and disabling SR-IOV before attempting to use the device with vfio-pci. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio

[PATCH] vfio-pci: Disable binding to PFs with SR-IOV enabled

2018-07-12 Thread Alex Williamson
can resolve this by re-binding to the host driver and disabling SR-IOV before attempting to use the device with vfio-pci. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio

Re: [PATCH] sample: vfio-mdev: avoid deadlock in mdev_access()

2018-07-11 Thread Alex Williamson
On Fri, 6 Jul 2018 23:50:06 +0300 Alexey Khoroshilov wrote: > mdev_access() calls mbochs_get_page() with mdev_state->ops_lock held, > while mbochs_get_page() locks the mutex by itself. > It leads to unavoidable deadlock. > > Found by Linux Driver Verification project (linuxtesting.org). > >

Re: [PATCH] sample: vfio-mdev: avoid deadlock in mdev_access()

2018-07-11 Thread Alex Williamson
On Fri, 6 Jul 2018 23:50:06 +0300 Alexey Khoroshilov wrote: > mdev_access() calls mbochs_get_page() with mdev_state->ops_lock held, > while mbochs_get_page() locks the mutex by itself. > It leads to unavoidable deadlock. > > Found by Linux Driver Verification project (linuxtesting.org). > >

[GIT PULL] VFIO fixes for v4.18-rc4

2018-07-06 Thread Alex Williamson
to d7ef4899d7182f9d4267b4e4a5cc3689c1a04f25: sample/vfio-mdev: Change return type to vm_fault_t (2018-07-04 10:42:04 -0600) VFIO fixes for v4.18 - Make vfio-pci IGD extensions optional via Kconfig (Alex Williamson) - Remove unused and soon to be removed

[GIT PULL] VFIO fixes for v4.18-rc4

2018-07-06 Thread Alex Williamson
to d7ef4899d7182f9d4267b4e4a5cc3689c1a04f25: sample/vfio-mdev: Change return type to vm_fault_t (2018-07-04 10:42:04 -0600) VFIO fixes for v4.18 - Make vfio-pci IGD extensions optional via Kconfig (Alex Williamson) - Remove unused and soon to be removed

Re: [PATCH] sample/vfio-mdev: Change return type to vm_fault_t

2018-07-05 Thread Alex Williamson
On Wed, 4 Jul 2018 21:00:14 +0530 Souptick Joarder wrote: > convert mbochs_region_vm_fault and mbochs_dmabuf_vm_fault > to return vm_fault_t type. > > Signed-off-by: Souptick Joarder > --- > samples/vfio-mdev/mbochs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH] sample/vfio-mdev: Change return type to vm_fault_t

2018-07-05 Thread Alex Williamson
On Wed, 4 Jul 2018 21:00:14 +0530 Souptick Joarder wrote: > convert mbochs_region_vm_fault and mbochs_dmabuf_vm_fault > to return vm_fault_t type. > > Signed-off-by: Souptick Joarder > --- > samples/vfio-mdev/mbochs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH 1/2] sample/mdev/mbochs: remove mbochs_kmap_atomic_dmabuf

2018-06-26 Thread Alex Williamson
On Mon, 25 Jun 2018 08:44:51 +0200 Gerd Hoffmann wrote: > Atomic mapping interface for dmabufs will be removed. > > Signed-off-by: Gerd Hoffmann Fixes: f664a5269542 ("dma-buf: remove kmap_atomic interface") Though really the above commit needs to be updated to include this fix to preserve

Re: [PATCH 1/2] sample/mdev/mbochs: remove mbochs_kmap_atomic_dmabuf

2018-06-26 Thread Alex Williamson
On Mon, 25 Jun 2018 08:44:51 +0200 Gerd Hoffmann wrote: > Atomic mapping interface for dmabufs will be removed. > > Signed-off-by: Gerd Hoffmann Fixes: f664a5269542 ("dma-buf: remove kmap_atomic interface") Though really the above commit needs to be updated to include this fix to preserve

Re: Requirement to get BAR pci_bus_address in user space

2018-06-14 Thread Alex Williamson
On Thu, 14 Jun 2018 16:18:15 +0530 Srinath Mannam wrote: > Hi Sinan Kaya, > > Here are the details, > > The issue is, For CMB cards SQs are allocated inside device BAR memory > which is different from normal cards. > In Normal cards SQ memory allocated at host side. > In both the cases

Re: Requirement to get BAR pci_bus_address in user space

2018-06-14 Thread Alex Williamson
On Thu, 14 Jun 2018 16:18:15 +0530 Srinath Mannam wrote: > Hi Sinan Kaya, > > Here are the details, > > The issue is, For CMB cards SQs are allocated inside device BAR memory > which is different from normal cards. > In Normal cards SQ memory allocated at host side. > In both the cases

[PATCH] vfio/pci: Make IGD support a configurable option

2018-06-11 Thread Alex Williamson
for X86. Signed-off-by: Alex Williamson --- drivers/vfio/pci/Kconfig | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig index 24ee2605b9f0..42dc1d3d71cf 100644 --- a/drivers/vfio/pci/Kconfig +++ b/drivers/vfio/pci

[PATCH] vfio/pci: Make IGD support a configurable option

2018-06-11 Thread Alex Williamson
for X86. Signed-off-by: Alex Williamson --- drivers/vfio/pci/Kconfig | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig index 24ee2605b9f0..42dc1d3d71cf 100644 --- a/drivers/vfio/pci/Kconfig +++ b/drivers/vfio/pci

[GIT PULL] VFIO updates for v4.18-rc1

2018-06-11 Thread Alex Williamson
to c1abca96b252a9627f99f39215b84e5de92bf1e3: samples: mbochs: add DMA_SHARED_BUFFER dependency (2018-06-09 09:23:52 -0600) VFIO updates for v4.18 - Bind type1 task tracking to group_leader to facilitate vCPU hotplug in QEMU (Alex Williamson) - Sample mdev

[GIT PULL] VFIO updates for v4.18-rc1

2018-06-11 Thread Alex Williamson
to c1abca96b252a9627f99f39215b84e5de92bf1e3: samples: mbochs: add DMA_SHARED_BUFFER dependency (2018-06-09 09:23:52 -0600) VFIO updates for v4.18 - Bind type1 task tracking to group_leader to facilitate vCPU hotplug in QEMU (Alex Williamson) - Sample mdev

Re: [PATCH] samples: mbochs: add DMA_SHARED_BUFFER dependency

2018-06-09 Thread Alex Williamson
On Wed, 30 May 2018 23:37:31 +0200 Arnd Bergmann wrote: > The new bochs vbe sample fails to link when DMA_SHARED_BUFFER is > disabled: > > ERROR: "dma_buf_export" [samples/vfio-mdev/mbochs.ko] undefined! > ERROR: "dma_buf_fd" [samples/vfio-mdev/mbochs.ko] undefined! > > This uses a 'select'

Re: [PATCH] samples: mbochs: add DMA_SHARED_BUFFER dependency

2018-06-09 Thread Alex Williamson
On Wed, 30 May 2018 23:37:31 +0200 Arnd Bergmann wrote: > The new bochs vbe sample fails to link when DMA_SHARED_BUFFER is > disabled: > > ERROR: "dma_buf_export" [samples/vfio-mdev/mbochs.ko] undefined! > ERROR: "dma_buf_fd" [samples/vfio-mdev/mbochs.ko] undefined! > > This uses a 'select'

Re: [PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-06-05 Thread Alex Williamson
[Cc +dwmw2] On Fri, 25 May 2018 14:54:08 -0600 Alex Williamson wrote: > On Fri, 25 May 2018 08:45:36 + > Shameerali Kolothum Thodi wrote: > > > Yes, the above changes related to list empty cases looks fine to me. > > Thanks Shameer, applied to my next branch wit

Re: [PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-06-05 Thread Alex Williamson
[Cc +dwmw2] On Fri, 25 May 2018 14:54:08 -0600 Alex Williamson wrote: > On Fri, 25 May 2018 08:45:36 + > Shameerali Kolothum Thodi wrote: > > > Yes, the above changes related to list empty cases looks fine to me. > > Thanks Shameer, applied to my next branch wit

[GIT PULL] VFIO fix for v4.17

2018-06-02 Thread Alex Williamson
prove memory pinning process for raw PFN mapping" (2018-06-02 08:41:44 -0600) VFIO fix v4.17 - Revert a pfn page mapping optimization identified as introducing a bad page state regression (Alex

[GIT PULL] VFIO fix for v4.17

2018-06-02 Thread Alex Williamson
prove memory pinning process for raw PFN mapping" (2018-06-02 08:41:44 -0600) VFIO fix v4.17 - Revert a pfn page mapping optimization identified as introducing a bad page state regression (Alex

[PATCH] Revert "vfio/type1: Improve memory pinning process for raw PFN mapping"

2018-06-02 Thread Alex Williamson
Fixes: 356e88ebe447 ("vfio/type1: Improve memory pinning process for raw PFN mapping") Cc: Jason Cai (Xiang Feng) Reported-by: Amadeusz Sławiński Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c | 25 ++--- 1 file changed, 10 insertions(+), 15

[PATCH] Revert "vfio/type1: Improve memory pinning process for raw PFN mapping"

2018-06-02 Thread Alex Williamson
Fixes: 356e88ebe447 ("vfio/type1: Improve memory pinning process for raw PFN mapping") Cc: Jason Cai (Xiang Feng) Reported-by: Amadeusz Sławiński Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c | 25 ++--- 1 file changed, 10 insertions(+), 15

Re: bisected 4.17-rc - BUG: Bad page state in process qemu-system-x86 pfn:7178f3

2018-06-02 Thread Alex Williamson
On Sat, 2 Jun 2018 11:56:24 +0200 Amadeusz Sławiński wrote: > Hey, > > so I've been getting system instability problems after shutting down > virtual machine with GPU pass-through in 4.17-rc series and I finally > got around to bisecting it. > > Seems to be caused by

Re: bisected 4.17-rc - BUG: Bad page state in process qemu-system-x86 pfn:7178f3

2018-06-02 Thread Alex Williamson
On Sat, 2 Jun 2018 11:56:24 +0200 Amadeusz Sławiński wrote: > Hey, > > so I've been getting system instability problems after shutting down > virtual machine with GPU pass-through in 4.17-rc series and I finally > got around to bisecting it. > > Seems to be caused by

Re: [PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function

2018-05-29 Thread Alex Williamson
On Wed, 30 May 2018 01:41:43 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, May 30, 2018 4:09 AM > > > > On Fri, 20 Apr 2018 16:42:51 -0700 > > Jacob Pan wrote: > > > > >

Re: [PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function

2018-05-29 Thread Alex Williamson
On Wed, 30 May 2018 01:41:43 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, May 30, 2018 4:09 AM > > > > On Fri, 20 Apr 2018 16:42:51 -0700 > > Jacob Pan wrote: > > > > >

Re: [PATCH 08/33] vfio: use match_string() helper

2018-05-25 Thread Alex Williamson
On Mon, 21 May 2018 19:57:45 +0800 Yisheng Xie <xieyishe...@huawei.com> wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > > Cc: Alex Williamson <alex.william...@redhat.com> > Cc: k...@v

Re: [PATCH 08/33] vfio: use match_string() helper

2018-05-25 Thread Alex Williamson
On Mon, 21 May 2018 19:57:45 +0800 Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > > Cc: Alex Williamson > Cc: k...@vger.kernel.org > Signed-off-by: Yisheng Xie > --- >

Re: [PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-05-25 Thread Alex Williamson
On Fri, 25 May 2018 08:45:36 + Shameerali Kolothum Thodi wrote: > Yes, the above changes related to list empty cases looks fine to me. Thanks Shameer, applied to my next branch with the discussed fixes for v4.18 (modulo patch 4/7 which Joerg already

Re: [PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-05-25 Thread Alex Williamson
On Fri, 25 May 2018 08:45:36 + Shameerali Kolothum Thodi wrote: > Yes, the above changes related to list empty cases looks fine to me. Thanks Shameer, applied to my next branch with the discussed fixes for v4.18 (modulo patch 4/7 which Joerg already pushed for v4.17). Thanks, Alex

Re: [PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-05-24 Thread Alex Williamson
[Cc +Joerg: AMD-Vi observation towards the end] On Wed, 18 Apr 2018 12:40:38 +0100 Shameer Kolothum wrote: > This series introduces an iova list associated with a vfio > iommu. The list is kept updated taking care of iommu apertures, > and reserved

Re: [PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-05-24 Thread Alex Williamson
[Cc +Joerg: AMD-Vi observation towards the end] On Wed, 18 Apr 2018 12:40:38 +0100 Shameer Kolothum wrote: > This series introduces an iova list associated with a vfio > iommu. The list is kept updated taking care of iommu apertures, > and reserved regions. Also this series adds checks for any

Re: [PATCH] PCI: Expand documentation for pci_add_dma_alias()

2018-05-23 Thread Alex Williamson
expand on the purpose of this function and common reasons it would > be used. > > Signed-off-by: Logan Gunthorpe <log...@deltatee.com> > Cc: Bjorn Helgaas <bhelg...@google.com> > Cc: Alex Williamson <alex.william...@redhat.com> > Cc: Doug Meyer <dme...@gigaio.com> > -

Re: [PATCH] PCI: Expand documentation for pci_add_dma_alias()

2018-05-23 Thread Alex Williamson
tion and common reasons it would > be used. > > Signed-off-by: Logan Gunthorpe > Cc: Bjorn Helgaas > Cc: Alex Williamson > Cc: Doug Meyer > --- > drivers/pci/pci.c | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/drivers/pc

Re: [PATCH 2/2] NTB: PCI Quirk to Enable Switchtec NT Functionality with IOMMU On

2018-05-22 Thread Alex Williamson
On Tue, 22 May 2018 16:51:26 -0500 Bjorn Helgaas wrote: > [+cc Alex] > > On Tue, May 22, 2018 at 02:09:59PM -0700, Doug Meyer wrote: > > Logan answered the questions quite thoroughly. (Thanks, Logan!) > > When you repost it, please rework the commit log so it answers the

Re: [PATCH 2/2] NTB: PCI Quirk to Enable Switchtec NT Functionality with IOMMU On

2018-05-22 Thread Alex Williamson
On Tue, 22 May 2018 16:51:26 -0500 Bjorn Helgaas wrote: > [+cc Alex] > > On Tue, May 22, 2018 at 02:09:59PM -0700, Doug Meyer wrote: > > Logan answered the questions quite thoroughly. (Thanks, Logan!) > > When you repost it, please rework the commit log so it answers the > questions

Re: [PATCH v4 0/2] vfio/mdev: Device namespace protection

2018-05-22 Thread Alex Williamson
On Tue, 22 May 2018 19:17:07 +0200 Halil Pasic wrote: > From vfio-ccw perspective I join Connie's assessment: vfio-ccw should > be fine with these changes. I'm however not too deeply involved with > the mdev framework, thus I don't feel comfortable r-b-ing. That results >

Re: [PATCH v4 0/2] vfio/mdev: Device namespace protection

2018-05-22 Thread Alex Williamson
On Tue, 22 May 2018 19:17:07 +0200 Halil Pasic wrote: > From vfio-ccw perspective I join Connie's assessment: vfio-ccw should > be fine with these changes. I'm however not too deeply involved with > the mdev framework, thus I don't feel comfortable r-b-ing. That results > in > Acked-by: Halil

<    3   4   5   6   7   8   9   10   11   12   >