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

2018-07-24 Thread Alex Williamson
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 0/3] PCI: NVMe reset quirks

2018-07-24 Thread Alex Williamson
mple delay 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

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 > quickly af

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] 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). > > Si

[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

[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 498e8bf51c633cc4496343e6113f

Re: [PATCH v3] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-23 Thread Alex Williamson
type. I am curious though which dGPUs and what size guests experience this problem, I'd also like to have those details in the commit log. Is there any performance data to go along with this? > This can be avoided by using the new IOTLB flushing interface. > > Cc: Alex Williamson &

Re: [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Alex Williamson
On Thu, 11 May 2017 15:27:53 +0200 Gerd Hoffmann wrote: > Hi, > > > While read the framebuffer region we have to tell the vendor driver which > > framebuffer we want to read? There are two framebuffers now in KVMGT that > > is primary and cursor. > > There are two methods to implement this:

Re: [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Alex Williamson
On Fri, 12 May 2017 02:12:10 + "Chen, Xiaoguang" wrote: > Hi Alex and Gerd, > > >-Original Message- > >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > >Behalf Of Alex Williamson > >Sent: Thursday, May 11, 2017 11

Re: [PATCH] PCI: Make SR-IOV capable GPU working on the SR-IOV incapable platform

2017-05-11 Thread Alex Williamson
On Fri, 12 May 2017 02:50:32 + "Cheng, Collins" wrote: > Hi Helgaas, > > Some AMD GPUs have hardware support for graphics SR-IOV. > If the SR-IOV capable GPU is plugged into the SR-IOV incapable > platform. It would cause a problem on PCI resource allocation in > current Linux kernel. > > T

Re: [PATCH] PCI: Make SR-IOV capable GPU working on the SR-IOV incapable platform

2017-05-11 Thread Alex Williamson
s the problem for your devices rather than fixing the bug. I'd suggest fixing the bug such that the PF is left in a functional state if the kernel is unable to allocate sufficient resources for the VFs. Thanks, Alex > -Original Message- > From: Alex Williamson [mailto:alex.

Re: [PATCH] PCI: Make SR-IOV capable GPU working on the SR-IOV incapable platform

2017-05-12 Thread Alex Williamson
stream kernel, upstream only patches old kernels through stable backports of commits to the latest kernel. Adding Yinghai as a resource allocation expert. Thanks, Alex > -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Friday, May 12,

Re: [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-12 Thread Alex Williamson
On Fri, 12 May 2017 11:12:05 +0200 Gerd Hoffmann wrote: > Hi, > > > If the contents of the framebuffer change or if the parameters of the > > framebuffer change? I can't image that creating a new dmabuf fd for > > every visual change within the framebuffer would be efficient, but I > > don't

Re: [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-12 Thread Alex Williamson
t; >To: Chen, Xiaoguang > >Cc: Tian, Kevin ; intel-...@lists.freedesktop.org; > >linux- > >ker...@vger.kernel.org; zhen...@linux.intel.com; Alex Williamson > >; Lv, Zhiyuan ; intel-gvt- > >d...@lists.freedesktop.org; Wang, Zhi A > >Subject: Re: [RFC PATCH 6/6

Re: [PATCH 1/3] Fix ERROR: trailing statements should be on next line

2017-05-14 Thread Alex Williamson
On Mon, 15 May 2017 05:58:05 +0300 "Michael S. Tsirkin" wrote: > On Sun, May 14, 2017 at 07:51:28PM +0200, Maciek Fijalkowski wrote: > > From: Maciej Fijalkowski > > > > Signed-off-by: Maciej Fijalkowski > > I prefer the original form - ; isn't a full statement. > > > --- > > drivers/net/

Re: [PATCH] iommu/vt-d: use domain instead of cache fetching

2018-01-10 Thread Alex Williamson
10ec0d6900868d3 ]--- > > This patch fixes that problem if applied to v4.13 kernel. > > The bug does not exist on latest upstream kernel since it's fixed as a > side effect of commit 13cf01744608 ("iommu/vt-d: Make use of iova > deferred flushing", 2017-08-15). But IMHO

[GIT PULL] VFIO updates for v4.16

2018-02-01 Thread Alex Williamson
ity helper cleanup (Alex Williamson) - Allow mmaps overlapping MSI-X vector table with region capability exposing this feature (Alexey Kardashevskiy) - mdev static cleanups (Xiongwei Song) ---- Alex Williamson (1): vfio: Simpl

Re: [RFC PATCH v2 1/2] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-18 Thread Alex Williamson
On Thu, 18 Jan 2018 10:25:12 +0700 Suravee Suthikulpanit wrote: > Hi Alex, > > On 1/9/18 3:53 AM, Alex Williamson wrote: > > On Wed, 27 Dec 2017 04:20:34 -0500 > > Suravee Suthikulpanit wrote: > >> diff --git a/drivers/vfio/vfio_iommu_type1.c > >

Re: [RFC v2 2/5] vfio/type1: Check reserve region conflict and update iova list

2018-01-19 Thread Alex Williamson
On Fri, 19 Jan 2018 09:48:22 + Shameerali Kolothum Thodi wrote: > > > +static void vfio_iommu_iova_resv_refresh(struct vfio_iommu *iommu) > > > +{ > > > + struct vfio_domain *d; > > > + struct vfio_group *g; > > > + struct vfio_iova *node, *tmp; > > > + struct iommu_resv_region *resv, *resv_ne

Re: [PATCH 04/12] pci-p2p: Clear ACS P2P flags for all client devices

2018-01-04 Thread Alex Williamson
On Thu, 4 Jan 2018 15:57:21 -0600 Bjorn Helgaas wrote: > [+cc Alex] > > On Thu, Jan 04, 2018 at 12:01:29PM -0700, Logan Gunthorpe wrote: > > When the ACS P2P flags are set in the downstream port of the switch, > > any P2P TLPs will be sent back to the root complex. The whole point of > > the P2P

Re: [PATCH 04/12] pci-p2p: Clear ACS P2P flags for all client devices

2018-01-04 Thread Alex Williamson
On Thu, 4 Jan 2018 17:00:47 -0700 Logan Gunthorpe wrote: > On 04/01/18 03:35 PM, Alex Williamson wrote: > > Yep, flipping these ACS bits invalidates any IOMMU groups that depend > > on the isolation of that downstream port and I suspect also any peers > > within the same

Re: [PATCH 04/12] pci-p2p: Clear ACS P2P flags for all client devices

2018-01-05 Thread Alex Williamson
On Fri, 5 Jan 2018 01:47:01 -0500 Jerome Glisse wrote: > On Thu, Jan 04, 2018 at 08:33:00PM -0700, Alex Williamson wrote: > > On Thu, 4 Jan 2018 17:00:47 -0700 > > Logan Gunthorpe wrote: > > > > > On 04/01/18 03:35 PM, Alex Williamson wrote: > > > >

Re: [PATCH 04/12] pci-p2p: Clear ACS P2P flags for all client devices

2018-01-05 Thread Alex Williamson
On Fri, 5 Jan 2018 10:10:51 -0700 Logan Gunthorpe wrote: > On 04/01/18 08:33 PM, Alex Williamson wrote: > > That's exactly what IOMMU groups represent, the smallest set of devices > > which have DMA isolation from other devices. By poking this hole, the > > IOMMU gr

[GIT PULL] IOMMU fixes for v4.15-rc7

2018-01-05 Thread Alex Williamson
Hi Linus, No sign of Joerg returning from paternity leave yet this year, so please accept this pull request including fixes via Will Deacon for arm-smmu-v3. Thanks, Alex The following changes since commit 30a7acd573899fd8b8ac39236eff6468b195ac7d: Linux 4.15-rc6 (2017-12-31 14:47:43 -0800) a

[PATCH] PCI: Add Marvell 9128 to DMA alias quirks

2018-01-16 Thread Alex Williamson
.html Reported-by: Binarus Tested-by: Binarus Signed-off-by: Alex Williamson --- drivers/pci/quirks.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 10684b17d0bd..db0c652c01cb 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/qui

Re: [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static

2018-01-16 Thread Alex Williamson
On Fri, 22 Dec 2017 07:12:26 +0800 Xiongwei Song wrote: > The functions vfio_mdev_probe, vfio_mdev_remove and the structure > vfio_mdev_driver are only used in this file, so make them static. > > Clean up sparse warnings: > drivers/vfio/mdev/vfio_mdev.c:114:5: warning: no previous prototype > fo

Re: [PATCH] pci: Do not read INTx PIN and LINE registers for virtual functions

2018-01-17 Thread Alex Williamson
On Wed, 17 Jan 2018 19:30:29 +0100 KarimAllah Ahmed wrote: > ... since INTx is not supported by-spec for virtual functions. But the spec also states that VFs must implement the interrupt pin register as read-only zero, so either this is redundant or it's a workaround for VFs that aren't quite co

Re: [PATCH] pci: Do not read INTx PIN and LINE registers for virtual functions

2018-01-17 Thread Alex Williamson
On Wed, 17 Jan 2018 20:02:44 +0100 KarimAllah Ahmed wrote: > On 01/17/2018 07:49 PM, Alex Williamson wrote: > > On Wed, 17 Jan 2018 19:30:29 +0100 > > KarimAllah Ahmed wrote: > > > >> ... since INTx is not supported by-spec for virtual functions. > > Bu

Re: [RFC v2 1/5] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-01-17 Thread Alex Williamson
On Fri, 12 Jan 2018 16:45:27 + Shameer Kolothum wrote: > This introduces an iova list that is valid for dma mappings. Make > sure the new iommu aperture window is valid and doesn't conflict > with any existing dma mappings during attach. Also update the iova > list with new aperture window du

Re: [RFC v2 2/5] vfio/type1: Check reserve region conflict and update iova list

2018-01-17 Thread Alex Williamson
On Fri, 12 Jan 2018 16:45:28 + Shameer Kolothum wrote: > This retrieves the reserved regions associated with dev group and > checks for conflicts with any existing dma mappings. Also update > the iova list excluding the reserved regions. > > Signed-off-by: Shameer Kolothum > --- > drivers/

Re: [RFC PATCH v2 1/2] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-08 Thread Alex Williamson
of mapped > IOVAs. > > This can be avoided by using the new IOTLB flushing interface. Hi Suravee, I've been playing with other ways we might do this, but I can't come up with anything better. A few comments below... > > Cc: Alex Williamson > Cc: Joerg Roedel &

Re: [RFC PATCH v2 1/2] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-08 Thread Alex Williamson
On Mon, 8 Jan 2018 13:53:29 -0700 Alex Williamson wrote: > On Wed, 27 Dec 2017 04:20:34 -0500 > Suravee Suthikulpanit wrote: > > > VFIO IOMMU type1 currently upmaps IOVA pages synchronously, which requires > > IOTLB flushing for every unmapping. This results in

Re: [pci PATCH v4 1/4] pci-iov: Add support for unmanaged SR-IOV

2018-03-11 Thread Alex Williamson
On Thu, 08 Mar 2018 11:02:29 -0800 Alexander Duyck wrote: > From: Alexander Duyck > > This patch is meant to add some basic functionality to support for SR-IOV > on devices when the VFs are not managed by some other entity in the device > other than the kernel. > > A new sysfs value called sri

Re: [pci PATCH v4 1/4] pci-iov: Add support for unmanaged SR-IOV

2018-03-12 Thread Alex Williamson
On Mon, 12 Mar 2018 09:01:54 -0700 Alexander Duyck wrote: > On Mon, Mar 12, 2018 at 12:59 AM, Christoph Hellwig wrote: > > On Sun, Mar 11, 2018 at 09:59:09PM -0600, Alex Williamson wrote: > >> I still struggle to understand why we need this "unmanaged" > >&g

Re: [RFC v2] vfio iommu type1: improve memory pinning process for raw PFN mapping

2018-03-12 Thread Alex Williamson
On Sat, 3 Mar 2018 20:10:33 +0800 "Jason Cai (Xiang Feng)" wrote: > When using vfio to pass through a PCIe device (e.g. a GPU card) that > has a huge BAR (e.g. 16GB), a lot of cycles are wasted on memory > pinning because PFNs of PCI BAR are not backed by struct page, and > the corresponding VMA

Re: [PATCH] vfio/type1: Search for a fitting iommu_domain before attaching the iommu_group

2018-03-12 Thread Alex Williamson
nhance our IOVA handling. Thanks, Alex > Signed-off-by: Filippo Sironi > Cc: Alex Williamson > Cc: k...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > drivers/vfio/vfio_iommu_type1.c | 32 ++-- > 1 file changed, 14 insertions(+), 18

Re: [PATCH] MAINTAINERS: vfio-platform: Update sub-maintainers

2018-03-23 Thread Alex Williamson
On Fri, 23 Mar 2018 18:59:29 +0100 Alvise Rigo wrote: > Update the sub-maintainer entry as Baptiste has moved. > > Add me and Eric Auger as sub-maintainers of the VFIO plaform driver. > > Signed-off-by: Alvise Rigo > --- > MAINTAINERS | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH] MAINTAINERS: vfio/platform: Update sub-maintainer

2018-03-26 Thread Alex Williamson
Baptiste has changed positions and has not been active with vfio-platform, replace with the current, de-facto sub-maintainer Eric Auger. Also add Alvise Rigo as a designated reviewer. Cc: Eric Auger Cc: Alvise Rigo Signed-off-by: Alex Williamson --- MAINTAINERS |3 ++- 1 file changed, 2

[GIT PULL] VFIO updates for v4.17

2018-04-06 Thread Alex Williamson
(Shunyong Yang) - More efficient PFN mapping handling in type1 backend (Jason Cai) - VFIO device ioeventfd interface (Alex Williamson) - Tag new vfio-platform sub-maintainer (Alex Williamson) Alex Williamson (4): vfio

Re: [PATCH] vfio iommu type1: improve memory pinning process for raw PFN mapping

2018-03-20 Thread Alex Williamson
On Mon, 19 Mar 2018 10:30:24 +0800 "Jason Cai (Xiang Feng)" wrote: > When using vfio to pass through a PCIe device (e.g. a GPU card) that > has a huge BAR (e.g. 16GB), a lot of cycles are wasted on memory > pinning because PFNs of PCI BAR are not backed by struct page, and > the corresponding VMA

Re: [PATCH] vfio iommu type1: improve memory pinning process for raw PFN mapping

2018-03-20 Thread Alex Williamson
On Tue, 20 Mar 2018 15:33:23 -0600 Alex Williamson wrote: > On Mon, 19 Mar 2018 10:30:24 +0800 > "Jason Cai (Xiang Feng)" wrote: > > > When using vfio to pass through a PCIe device (e.g. a GPU card) that > > has a huge BAR (e.g. 16GB), a lot of cycles are waste

Re: [PATCH v5 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-03-20 Thread Alex Williamson
On Mon, 19 Mar 2018 07:51:58 + "Tian, Kevin" wrote: > > From: Shameer Kolothum > > Sent: Friday, March 16, 2018 12:35 AM > > > > This retrieves the reserved regions associated with dev group and > > checks for conflicts with any existing dma mappings. Also update > > the iova list excluding

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

2018-03-20 Thread Alex Williamson
On Mon, 19 Mar 2018 08:28:32 + "Tian, Kevin" wrote: > > From: Shameer Kolothum > > Sent: Friday, March 16, 2018 12:35 AM > > > > 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

Re: [PATCH v2] drm/i915/gvt: throw error on unhandled vfio ioctls

2018-03-21 Thread Alex Williamson
On Wed, 21 Mar 2018 10:08:03 +0100 Gerd Hoffmann wrote: > On unknown/unhandled ioctls the driver should return an error, so > userspace knows it tried to use something unsupported. > > Cc: sta...@vger.kernel.org > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- >

Re: [PATCH v5 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-03-21 Thread Alex Williamson
On Wed, 21 Mar 2018 03:30:29 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, March 21, 2018 6:38 AM > > > > On Mon, 19 Mar 2018 07:51:58 + > > "Tian, Kevin" wrote: > >

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

2018-03-21 Thread Alex Williamson
On Wed, 21 Mar 2018 03:28:16 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, March 21, 2018 6:55 AM > > > > On Mon, 19 Mar 2018 08:28:32 + > > "Tian, Kevin" wrote: > >

[PATCH v2] vfio/pci: Quiet broken INTx whining when INTx is unsupported by device

2018-03-21 Thread Alex Williamson
rjun Vynipadath Fixes: 2170dd04316e ("vfio-pci: Mask INTx if a device is not capabable of enabling it") Acked-by: Casey Leedom Signed-off-by: Alex Williamson --- v2: One more quick spin on this, barring issues I'd like to get a pull request in for rc7. The regression was origina

Re: [PATCH v5 7/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-03-22 Thread Alex Williamson
On Thu, 15 Mar 2018 16:35:09 + Shameer Kolothum wrote: > This pretty much reverts commit 273df9635385 ("iommu/dma: Make PCI > window reservation generic") by moving the PCI window region > reservation back into the dma specific path so that these regions > doesn't get exposed via the IOMMU A

Re: [PATCH] vfio-mdev/samples: change RDI interrupt condition

2018-03-22 Thread Alex Williamson
On Fri, 9 Mar 2018 11:36:05 +0530 Kirti Wankhede wrote: > Thanks for fixing it. > Patch looks good to me. > +Alex to pull this patch. > > Reviewed by: Kirti Wankhede Applied to vfio next branch for v4.17 with Kirti's Rb. Thanks, Alex > On 3/8/2018 12:38 PM, Shunyong Yang wrote: > > When FIF

Re: [PATCH v5] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-03-22 Thread Alex Williamson
On Thu, 22 Feb 2018 15:59:15 -0700 Alex Williamson wrote: > On Thu, 1 Feb 2018 01:27:38 -0500 > Suravee Suthikulpanit wrote: > > > VFIO IOMMU type1 currently upmaps IOVA pages synchronously, which requires > > IOTLB flushing for every unmapping. This results in

Re: [PATCH] vfio iommu type1: improve memory pinning process for raw PFN mapping

2018-03-22 Thread Alex Williamson
On Thu, 22 Mar 2018 12:52:16 +0800 "Jason Cai (Xiang Feng)" wrote: > When using vfio to pass through a PCIe device (e.g. a GPU card) that > has a huge BAR (e.g. 16GB), a lot of cycles are wasted on memory > pinning because PFNs of PCI BAR are not backed by struct page, and > the corresponding VMA

[GIT PULL] VFIO fix for v4.16-rc7

2018-03-23 Thread Alex Williamson
sking INTx where it cannot be enabled, plays poorly with SR-IOV VFs and presumes DisINTx support. ---- Alex Williamson (1): Revert: "vfio-pci: Mask INTx if a device is not capabable of enabling it" drivers/vfio/pci/vfio_p

Re: [RFC PATCH] vfio: Implement new Ioctl VFIO_IOMMU_GET_DIRTY_BITMAP

2018-04-10 Thread Alex Williamson
ude > #include > +#include > > #define DRIVER_VERSION "0.2" > #define DRIVER_AUTHOR "Alex Williamson " > @@ -1658,6 +1659,23 @@ static int vfio_domains_have_iommu_cache(struct > vfio_iommu *iommu) > return ret; > } > > +static void

Re: [RFC PATCH] vfio: Implement new Ioctl VFIO_IOMMU_GET_DIRTY_BITMAP

2018-04-10 Thread Alex Williamson
On Tue, 10 Apr 2018 09:19:26 -0600 Alex Williamson wrote: > On Tue, 10 Apr 2018 16:18:59 +0800 > Yulei Zhang wrote: > > > Corresponding to the V4 migration patch set for vfio pci device, > > this patch is to implement the new ioctl VFIO_IOMMU_GET_DIRTY_BITMAP > > to

Re: [PATCH v11 26/26] s390: doc: detailed specifications for AP virtualization

2018-09-26 Thread Alex Williamson
On Tue, 25 Sep 2018 19:16:41 -0400 Tony Krowiak wrote: > From: Tony Krowiak > > This patch provides documentation describing the AP architecture and > design concepts behind the virtualization of AP devices. It also > includes an example of how to configure AP devices for exclusive > use of KVM

Re: [PATCH v3 2/2] vfio: add edid support to mbochs sample driver

2018-09-27 Thread Alex Williamson
On Fri, 28 Sep 2018 01:27:16 +0530 Kirti Wankhede wrote: > On 9/21/2018 2:00 PM, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > @@ -964,6 +1050,20 @@ static int mbochs_get_region_info(struct mdev_device > > *mdev, > > region_info->flags = (VFIO_REGION_INFO_FLAG_READ | >

Re: [PATCH v3 2/2] vfio: add edid support to mbochs sample driver

2018-09-28 Thread Alex Williamson
On Fri, 28 Sep 2018 14:10:26 +0530 Kirti Wankhede wrote: > On 9/28/2018 11:10 AM, Gerd Hoffmann wrote: > >>> + case MBOCHS_EDID_REGION_INDEX: > >>> + ext->base.argsz = sizeof(*ext); > >>> + ext->base.offset = MBOCHS_EDID_OFFSET; > >>> + ext->base.size = MBOCHS_EDID_SIZE; >

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-27 Thread Alex Williamson
On Tue, 27 Nov 2018 09:33:56 -0600 Bjorn Helgaas wrote: > [+cc David, Jan, Alex, Maik, Chris] > > On Tue, Nov 27, 2018 at 08:46:33AM +, Bharat Bhushan wrote: > > NXP (Freescale Vendor ID) LS1088 chips do not behave correctly after > > bus reset with e1000e. Link state of device does not come

Re: [PATCH v2 2/3] vfio: ap: ioctl definitions for AP Queue Interrupt Control

2018-11-27 Thread Alex Williamson
On Thu, 22 Nov 2018 18:11:14 +0100 Pierre Morel wrote: > We define two VFIO ioctl command to setup and clear > the AP Queues interrupt. > > Arguments passed by the guest are: > - the apqn, AP queue number > - the Notification by address > - the identifier of the previously associated adapter W

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-29 Thread Alex Williamson
gt; > > > On Tue, Nov 27, 2018 at 10:32 PM Bharat Bhushan > > wrote: > > > > > > -Original Message- > > > > From: Alex Williamson > > > > Sent: Tuesday, November 27, 2018 9:39 PM > > > > To: Bjorn Helgaas > > &g

[PATCH v2] vfio/pci: Parallelize device open and release

2018-11-16 Thread Alex Williamson
he bus/slot reset as we're only attempting a single reset for this group of devices anyway. This allows much greater scaling as we're bounded in the number of devices protected by a single reflck object. Reported-by: Christian Ehrhardt Tested-by: Christian Ehrhardt Reviewed-by: E

Re: [PATCH] vfio/pci: Parallelize device open and release

2018-11-13 Thread Alex Williamson
On Tue, 13 Nov 2018 15:42:49 +0100 Auger Eric wrote: > Hi Alex, > > On 11/9/18 11:09 PM, Alex Williamson wrote: > > In commit 61d792562b53 ("vfio-pci: Use mutex around open, release, and > > remove") a mutex was added to freeze the refcnt for a device so th

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-30 Thread Alex Williamson
On Fri, 30 Nov 2018 06:24:16 + Bharat Bhushan wrote: > Hi Alex, > > > -Original Message- > > From: Alex Williamson > > Sent: Friday, November 30, 2018 11:26 AM > > To: Bharat Bhushan > > Cc: Bjorn Helgaas ; Bjorn Helgaas > > ; linux-...@

[PATCH] vfio/pci: Parallelize device open and release

2018-11-09 Thread Alex Williamson
e released in parallel while serializing per bus/slot. Reported-by: Christian Ehrhardt Tested-by: Christian Ehrhardt Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 157 ++- drivers/vfio/pci/vfio_pci_private.h |6 + 2 files ch

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 bis

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 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 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 v3 1/2] vfio: platform: Fix reset module leak in error path

2018-05-11 Thread Alex Williamson
On Wed, 11 Apr 2018 11:15:48 +0200 Geert Uytterhoeven wrote: > If the IOMMU group setup fails, the reset module is not released. > > Fixes: b5add544d677d363 ("vfio, platform: make reset driver a requirement by > default") > Signed-off-by: Geert Uytterhoeven > Reviewed-by: Eric Auger > Reviewe

Re: [PATCH v2] vfio: platform: Make printed error messages more consistent

2018-05-11 Thread Alex Williamson
On Tue, 10 Apr 2018 16:54:11 +0200 Geert Uytterhoeven wrote: > - Capitalize the first word of error messages, > - Unwrap statements that fit on a single line, > - Use "VFIO" instead of "vfio" as the error message prefix. > > Signed-off-by: Geert Uytterhoeven > Reviewed-by: Eric Auger > -

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 356e88ebe4473a3663cf3d14727

[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

[GIT PULL] VFIO fix for v4.17

2018-06-02 Thread Alex Williamson
/type1: Improve 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 regress

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

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

2018-07-06 Thread Alex Williamson
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: 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 physical

[PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-16 Thread Alex Williamson
ation guarantee provided by the mdev core with respect to creation and removal of mdev devices, mdev_parent.lock provided this only as a side-effect of the implementation for locking the namespace per parent. That serialization is now removed. Signed-off-by: Alex Williamson --- v3: Rework locking and

Re: [PATCH v2] vfio/mdev: Check globally for duplicate devices

2018-05-16 Thread Alex Williamson
On Thu, 17 May 2018 01:01:40 +0530 Kirti Wankhede wrote: > On 5/16/2018 8:53 PM, Alex Williamson wrote: > > When we create an mdev device, we check for duplicates against the > > parent device and return -EEXIST if found, but the mdev device > > namespace is global since w

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Thu, 17 May 2018 21:25:22 +0530 Kirti Wankhede wrote: > On 5/17/2018 1:39 PM, Cornelia Huck wrote: > > On Wed, 16 May 2018 21:30:19 -0600 > > Alex Williamson wrote: > > > >> When we create an mdev device, we check for duplicates against the > >> pa

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Fri, 18 May 2018 01:56:50 +0530 Kirti Wankhede wrote: > On 5/17/2018 9:50 PM, Alex Williamson wrote: > > On Thu, 17 May 2018 21:25:22 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 1:39 PM, Cornelia Huck wrote: > >>> On Wed, 16 May 2018 2

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-17 Thread Alex Williamson
On Thu, 17 May 2018 15:37:37 -0600 Alex Williamson wrote: > On Fri, 18 May 2018 01:56:50 +0530 > Kirti Wankhede wrote: > > > On 5/17/2018 9:50 PM, Alex Williamson wrote: > > > On Thu, 17 May 2018 21:25:22 +0530 > > > Kirti Wankhede wrote: > > >

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Alex Williamson
On Fri, 18 May 2018 12:34:03 +0530 Kirti Wankhede wrote: > On 5/18/2018 3:07 AM, Alex Williamson wrote: > > On Fri, 18 May 2018 01:56:50 +0530 > > Kirti Wankhede wrote: > > > >> On 5/17/2018 9:50 PM, Alex Williamson wrote: > >>> On Thu, 17 Ma

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

2018-05-18 Thread Alex Williamson
nt code returns -ENODEV in this race condition is about 50% easier to hit than it exists in this series with patch 1 alone. Thanks, Alex --- Alex Williamson (2): vfio/mdev: Check globally for duplicate devices vfio/mdev: Re-order sysfs attribute creation Documentation/vfio-med

[PATCH v4 2/2] vfio/mdev: Re-order sysfs attribute creation

2018-05-18 Thread Alex Williamson
uce this gap by adding this attribute as a final step of our sysfs setup. Signed-off-by: Alex Williamson --- drivers/vfio/mdev/mdev_sysfs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/vfio/mdev/mdev_sysfs.c b/drivers/vfio/mdev/mdev_sysfs.c ind

[PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Alex Williamson
would see -EAGAIN while the device is in this transitory state. Signed-off-by: Alex Williamson --- Documentation/vfio-mediated-device.txt |5 ++ drivers/vfio/mdev/mdev_core.c | 102 +++- drivers/vfio/mdev/mdev_private.h |2 - 3 files change

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

2018-08-16 Thread Alex Williamson
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

Re: [PATCH] vfio/mdev: add static modifier to add_mdev_supported_type

2018-12-12 Thread Alex Williamson
On Tue, 13 Nov 2018 09:45:43 +0100 Paolo Cretaro wrote: > Set add_mdev_supported_type as static since it is only used within > mdev_sysfs.c. > This fixes -Wmissing-prototypes gcc warning. > > Signed-off-by: Paolo Cretaro > --- > drivers/vfio/mdev/mdev_sysfs.c | 4 ++-- > 1 file changed, 2 inse

Re: [PATCH kernel v6 19/20] vfio_pci: Allow regions to add own capabilities

2018-12-19 Thread Alex Williamson
t; This adds an add_capability() hook to vfio_pci_regops. > > Signed-off-by: Alexey Kardashevskiy > Acked-by: Alex Williamson > --- > Changes: > v3: > * removed confusing rationale for the patch, the next patch makes > use of it anyway > --- > drivers/vfio/pci/v

Re: [PATCH kernel v6 18/20] vfio_pci: Allow mapping extra regions

2018-12-19 Thread Alex Williamson
upport for mapping > them to the userspace. > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: David Gibson > Acked-by: Alex Williamson > --- > Changes: > v2: > * reverted one of mistakenly removed error checks > --- > drivers/vfio/pci/vfio_pci_private.h | 3

Re: [PATCH kernel v6 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-19 Thread Alex Williamson
; + } > + > + if (pdev->vendor == PCI_VENDOR_ID_IBM && > + IS_ENABLED(CONFIG_VFIO_PCI_NVLINK2)) { > + ret = vfio_pci_ibm_npu2_init(vdev); > + if (ret && ret != -ENODEV) { > + dev_warn(&vdev-&g

Re: [PATCH] vfio-mdev/samples: Use u8 instead of char for handle functions

2018-12-17 Thread Alex Williamson
On Fri, 19 Oct 2018 11:04:27 -0700 Nathan Chancellor wrote: > Clang warns: > > samples/vfio-mdev/mtty.c:592:39: warning: implicit conversion from 'int' > to 'char' changes value from 162 to -94 [-Wconstant-conversion] > *buf = UART_MSR_DSR | UART_MSR_DDSR | UART_MSR_DCD; >

Re: [PATCH kernel v7 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-20 Thread Alex Williamson
On Thu, 20 Dec 2018 19:23:50 +1100 Alexey Kardashevskiy wrote: > POWER9 Witherspoon machines come with 4 or 6 V100 GPUs which are not > pluggable PCIe devices but still have PCIe links which are used > for config space and MMIO. In addition to that the GPUs have 6 NVLinks > which are connected to

Re: [PATCH kernel v7 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-20 Thread Alex Williamson
On Fri, 21 Dec 2018 12:23:16 +1100 Alexey Kardashevskiy wrote: > On 21/12/2018 03:46, Alex Williamson wrote: > > On Thu, 20 Dec 2018 19:23:50 +1100 > > Alexey Kardashevskiy wrote: > > > >> POWER9 Witherspoon machines come with 4 or 6 V100 GPUs which are not &

Re: [PATCH kernel v7 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-20 Thread Alex Williamson
On Fri, 21 Dec 2018 12:50:00 +1100 Alexey Kardashevskiy wrote: > On 21/12/2018 12:37, Alex Williamson wrote: > > On Fri, 21 Dec 2018 12:23:16 +1100 > > Alexey Kardashevskiy wrote: > > > >> On 21/12/2018 03:46, Alex Williamson wrote: > >>> On Th

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

2018-12-21 Thread Alex Williamson
with per bus lock to allow concurrent open and release (Alex Williamson) - Declare mdev function as static (Paolo Cretaro) - Convert char to u8 in mdev/mtty sample driver (Nathan Chancellor) Alex Williamson (1): vfio/pci

Re: [PATCH] vfio_pci: Add local source directory as include

2019-01-07 Thread Alex Williamson
On Mon, 7 Jan 2019 20:39:19 +0900 Masahiro Yamada wrote: > On Mon, Jan 7, 2019 at 8:09 PM Cornelia Huck wrote: > > > > On Mon, 7 Jan 2019 19:12:10 +0900 > > Masahiro Yamada wrote: > > > > > On Mon, Jan 7, 2019 at 6:18 PM Michael Ellerman > > > wrote: > > > > > > > > Laura Abbott writes:

Re: [PATCH] vfio_pci: Add local source directory as include

2019-01-07 Thread Alex Williamson
On Tue, 8 Jan 2019 10:52:43 +1100 Alexey Kardashevskiy wrote: > On 08/01/2019 07:13, Alex Williamson wrote: > > On Mon, 7 Jan 2019 20:39:19 +0900 > > Masahiro Yamada wrote: > > > >> On Mon, Jan 7, 2019 at 8:09 PM Cornelia Huck wrote: > >>&g

Re: [PATCH v2] drivers/vfio: Fix a redundant copy bug

2018-10-08 Thread Alex Williamson
On Mon, 8 Oct 2018 13:06:20 -0500 Wenwen Wang wrote: > In vfio_spapr_iommu_eeh_ioctl(), if the ioctl command is VFIO_EEH_PE_OP, > the user-space buffer 'arg' is copied to the kernel object 'op' and the > 'argsz' and 'flags' fields of 'op' are checked. If the check fails, an > error code EINVAL i

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