[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

[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: [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

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

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 <alex.william...@redhat.com> wrote: > On Thu, 1 Feb 2018 01:27:38 -0500 > Suravee Suthikulpanit <suravee.suthikulpa...@amd.com> wrote: > > > VFIO IOMMU type1 currently upmaps IOVA pages synchronously, which requires &

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

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

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

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

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

2018-03-21 Thread Alex Williamson
padath <ar...@chelsio.com> Fixes: 2170dd04316e ("vfio-pci: Mask INTx if a device is not capabable of enabling it") Acked-by: Casey Leedom <lee...@chelsio.com> Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- v2: One more quick spin on this, barring

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

2018-03-21 Thread Alex Williamson
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 originally masked

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" <kevin.t...@intel.com> 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

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: > >

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" <kevin.t...@intel.com> 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

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

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

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

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] 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 <alex.william...@redhat.com> wrote: > On Mon, 19 Mar 2018 10:30:24 +0800 > "Jason Cai (Xiang Feng)" <jason@linux.alibaba.com> wrote: > > > When using vfio to pass through a PCIe device (e.g. a GPU car

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] 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

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

[PATCH v2 2/3] vfio/pci: Use endian neutral helpers

2018-03-15 Thread Alex Williamson
change other than big endian systems aren't penalized with wasted swaps. Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/pci/vfio_pci_rdwr.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/vf

[PATCH v2 2/3] vfio/pci: Use endian neutral helpers

2018-03-15 Thread Alex Williamson
change other than big endian systems aren't penalized with wasted swaps. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_rdwr.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci

[PATCH v2 1/3] vfio/pci: Pull BAR mapping setup from read-write path

2018-03-15 Thread Alex Williamson
This creates a common helper that we'll use for ioeventfd setup. Reviewed-by: Peter Xu <pet...@redhat.com> Reviewed-by: Eric Auger <eric.au...@redhat.com> Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/pci/vfio

[PATCH v2 0/3] vfio/pci: ioeventfd support

2018-03-15 Thread Alex Williamson
l io reads and writes. This should be a nop for little-endian and avoid redundant swap on big-endian, and hopefully resolves Alexey's comments regarding the endian nature of this interface. * Rebase to v4.16-rc3 Thanks, Alex --- Alex Williamson (3): vfio/pci: Pull BAR mapping setup from read-

[PATCH v2 3/3] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
a virtualized region in order to allow the MSI interrupt to re-trigger. Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/pci/vfio_pci.c | 35 +++ drivers/vfio/pci/vfio_pci_private.h | 19 ++ drivers/vfio/pci/vfio_pci_rdwr.c

[PATCH v2 1/3] vfio/pci: Pull BAR mapping setup from read-write path

2018-03-15 Thread Alex Williamson
This creates a common helper that we'll use for ioeventfd setup. Reviewed-by: Peter Xu Reviewed-by: Eric Auger Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_rdwr.c | 39 ++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git

[PATCH v2 0/3] vfio/pci: ioeventfd support

2018-03-15 Thread Alex Williamson
l io reads and writes. This should be a nop for little-endian and avoid redundant swap on big-endian, and hopefully resolves Alexey's comments regarding the endian nature of this interface. * Rebase to v4.16-rc3 Thanks, Alex --- Alex Williamson (3): vfio/pci: Pull BAR mapping setup from read-

[PATCH v2 3/3] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
a virtualized region in order to allow the MSI interrupt to re-trigger. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 35 +++ drivers/vfio/pci/vfio_pci_private.h | 19 ++ drivers/vfio/pci/vfio_pci_rdwr.c| 111 +++ include

Re: [RFC PATCH] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
On Tue, 13 Mar 2018 13:38:00 +0100 Auger Eric <eric.au...@redhat.com> wrote: > On 08/02/18 02:22, Alexey Kardashevskiy wrote: > > On 08/02/18 01:12, Alex Williamson wrote: > >> On Wed, 7 Feb 2018 15:48:26 +1100 > >> Alexey Kardashevskiy <a...@ozlabs.ru&g

Re: [RFC PATCH] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
On Tue, 13 Mar 2018 13:38:00 +0100 Auger Eric wrote: > On 08/02/18 02:22, Alexey Kardashevskiy wrote: > > On 08/02/18 01:12, Alex Williamson wrote: > >> On Wed, 7 Feb 2018 15:48:26 +1100 > >> Alexey Kardashevskiy wrote: > >>> On 07/02/18 15:25, Alex W

Re: [PATCH 3/3] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
On Wed, 7 Mar 2018 13:56:44 +0800 Peter Xu <pet...@redhat.com> wrote: > On Wed, Feb 28, 2018 at 01:15:20PM -0700, Alex Williamson wrote: > > [...] > > > @@ -1174,6 +1206,8 @@ static int vfio_pci_probe(struct pci_dev *pdev, const > > struct pci_device_

Re: [PATCH 3/3] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
On Wed, 7 Mar 2018 13:56:44 +0800 Peter Xu wrote: > On Wed, Feb 28, 2018 at 01:15:20PM -0700, Alex Williamson wrote: > > [...] > > > @@ -1174,6 +1206,8 @@ static int vfio_pci_probe(struct pci_dev *pdev, const > > struct pci_device_id *id) > > vdev

Re: [PATCH 3/3] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
On Tue, 13 Mar 2018 14:12:34 +0100 Auger Eric <eric.au...@redhat.com> wrote: > On 28/02/18 21:15, Alex Williamson wrote: > > +long vfio_pci_ioeventfd(struct vfio_pci_device *vdev, loff_t offset, > > + uint64_t data, int count, int fd) > > +{ > >

Re: [PATCH 3/3] vfio/pci: Add ioeventfd support

2018-03-15 Thread Alex Williamson
On Tue, 13 Mar 2018 14:12:34 +0100 Auger Eric wrote: > On 28/02/18 21:15, Alex Williamson wrote: > > +long vfio_pci_ioeventfd(struct vfio_pci_device *vdev, loff_t offset, > > + uint64_t data, int count, int fd) > > +{ > > + struct pci_dev *pdev = vde

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

2018-03-15 Thread Alex Williamson
4316e ("vfio-pci: Mask INTx if a device is not capabable of enabling it") Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/pci/vfio_pci.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/vfio/pci/vfio_pci.c b/d

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

2018-03-15 Thread Alex Williamson
NTx if a device is not capabable of enabling it") Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index ad18ed266dc0..f2ca24644a2c

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

2018-03-12 Thread Alex Williamson
our IOVA handling. Thanks, Alex > Signed-off-by: Filippo Sironi <sir...@amazon.de> > Cc: Alex Williamson <alex.william...@redhat.com> > Cc: k...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > drivers/vfio/vfio_iommu_type1.c | 32 ++---

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

2018-03-12 Thread Alex Williamson
nks, 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 deletions(-) > > diff -

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

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: [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 <alexander.du...@gmail.com> wrote: > On Mon, Mar 12, 2018 at 12:59 AM, Christoph Hellwig <h...@lst.de> wrote: > > On Sun, Mar 11, 2018 at 09:59:09PM -0600, Alex Williamson wrote: > >> I still struggle to understa

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" >

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 >

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

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

2018-03-02 Thread Alex Williamson
On Fri, 02 Mar 2018 15:44:25 -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 the kernel. The functions >

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

2018-03-02 Thread Alex Williamson
On Fri, 02 Mar 2018 15:44:25 -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 the kernel. The functions > provided here can be used by drivers such as vfio-pci and

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Alex Williamson
On Fri, 2 Mar 2018 06:54:17 + "Tian, Kevin" <kevin.t...@intel.com> wrote: > > From: Alex Williamson > > Sent: Friday, March 2, 2018 4:22 AM > > > > > > I am pretty sure that you are describing is true of some, but not for > > > al

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Alex Williamson
On Fri, 2 Mar 2018 06:54:17 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Friday, March 2, 2018 4:22 AM > > > > > > I am pretty sure that you are describing is true of some, but not for > > > all. I think the Amazon solut

Re: [PATCH 0/3] vfio/pci: ioeventfd support

2018-03-02 Thread Alex Williamson
On Fri, 2 Mar 2018 07:08:51 + "Tian, Kevin" <kevin.t...@intel.com> wrote: > > From: Alex Williamson > > Sent: Thursday, March 1, 2018 4:15 AM > > > > A vfio ioeventfd will perform the pre-specified device write on > > triggering of

Re: [PATCH 0/3] vfio/pci: ioeventfd support

2018-03-02 Thread Alex Williamson
On Fri, 2 Mar 2018 07:08:51 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Thursday, March 1, 2018 4:15 AM > > > > A vfio ioeventfd will perform the pre-specified device write on > > triggering of an eventfd. When coupled with KVM

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Alex Williamson
On Thu, 1 Mar 2018 18:49:53 -0800 Alexander Duyck <alexander.du...@gmail.com> wrote: > On Thu, Mar 1, 2018 at 3:58 PM, Alex Williamson > <alex.william...@redhat.com> wrote: > > On Thu, 1 Mar 2018 14:42:40 -0800 > > Alexander Duyck <alexander.du...@gmail.com> w

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Alex Williamson
On Thu, 1 Mar 2018 18:49:53 -0800 Alexander Duyck wrote: > On Thu, Mar 1, 2018 at 3:58 PM, Alex Williamson > wrote: > > On Thu, 1 Mar 2018 14:42:40 -0800 > > Alexander Duyck wrote: > > > >> On Thu, Mar 1, 2018 at 12:22 PM, Alex Williamson > >> wr

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-03-02 Thread Alex Williamson
On Fri, 2 Mar 2018 13:19:58 + Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com> wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, February 28, 2018 3:24 PM > > To: Auger Eric

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-03-02 Thread Alex Williamson
On Fri, 2 Mar 2018 13:19:58 + Shameerali Kolothum Thodi wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, February 28, 2018 3:24 PM > > To: Auger Eric > > Cc: Shameerali Kolothum Thodi ; &g

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-01 Thread Alex Williamson
On Thu, 1 Mar 2018 14:42:40 -0800 Alexander Duyck <alexander.du...@gmail.com> wrote: > On Thu, Mar 1, 2018 at 12:22 PM, Alex Williamson > <alex.william...@redhat.com> wrote: > > On Wed, 28 Feb 2018 16:36:38 -0800 > > Alexander Duyck <alexander.du...@gmail.com&

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-01 Thread Alex Williamson
On Thu, 1 Mar 2018 14:42:40 -0800 Alexander Duyck wrote: > On Thu, Mar 1, 2018 at 12:22 PM, Alex Williamson > wrote: > > On Wed, 28 Feb 2018 16:36:38 -0800 > > Alexander Duyck wrote: > > > >> On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson > >> wr

Re: [PATCH v2 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-03-01 Thread Alex Williamson
On Thu, 1 Mar 2018 18:54:01 + "Stephen Bates" wrote: > Thanks for the detailed review Bjorn! > > >> > >> +Enabling this option will also disable ACS on all ports behind > >> +any PCIe switch. This effictively puts all devices behind any > >> +switch into

Re: [PATCH v2 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-03-01 Thread Alex Williamson
On Thu, 1 Mar 2018 18:54:01 + "Stephen Bates" wrote: > Thanks for the detailed review Bjorn! > > >> > >> +Enabling this option will also disable ACS on all ports behind > >> +any PCIe switch. This effictively puts all devices behind any > >> +switch into the same IOMMU group.

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-01 Thread Alex Williamson
On Wed, 28 Feb 2018 16:36:38 -0800 Alexander Duyck <alexander.du...@gmail.com> wrote: > On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson > <alex.william...@redhat.com> wrote: > > On Wed, 28 Feb 2018 09:49:21 -0800 > > Alexander Duyck <alexander.du...@gmail.com&

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-01 Thread Alex Williamson
On Wed, 28 Feb 2018 16:36:38 -0800 Alexander Duyck wrote: > On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson > wrote: > > On Wed, 28 Feb 2018 09:49:21 -0800 > > Alexander Duyck wrote: > > > >> On Tue, Feb 27, 2018 at 2:25 PM, Alexander Duyck > >> wr

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-02-28 Thread Alex Williamson
On Wed, 28 Feb 2018 09:49:21 -0800 Alexander Duyck <alexander.du...@gmail.com> wrote: > On Tue, Feb 27, 2018 at 2:25 PM, Alexander Duyck > <alexander.du...@gmail.com> wrote: > > On Tue, Feb 27, 2018 at 1:40 PM, Alex Williamson > > <alex.william...@redhat.com>

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-02-28 Thread Alex Williamson
On Wed, 28 Feb 2018 09:49:21 -0800 Alexander Duyck wrote: > On Tue, Feb 27, 2018 at 2:25 PM, Alexander Duyck > wrote: > > On Tue, Feb 27, 2018 at 1:40 PM, Alex Williamson > > wrote: > >> On Tue, 27 Feb 2018 11:06:54 -0800 > >> Alexander Duyck wrote

[PATCH 3/3] vfio/pci: Add ioeventfd support

2018-02-28 Thread Alex Williamson
a virtualized region in order to allow the MSI interrupt to re-trigger. Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/pci/vfio_pci.c | 34 ++ drivers/vfio/pci/vfio_pci_private.h | 18 + drivers/vfio/pci/vfio_pci_rdwr.c

[PATCH 3/3] vfio/pci: Add ioeventfd support

2018-02-28 Thread Alex Williamson
a virtualized region in order to allow the MSI interrupt to re-trigger. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 34 ++ drivers/vfio/pci/vfio_pci_private.h | 18 + drivers/vfio/pci/vfio_pci_rdwr.c| 115 +++ include

[PATCH 2/3] vfio/pci: Use endian neutral helpers

2018-02-28 Thread Alex Williamson
change other than big endian systems aren't penalized with wasted swaps. Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/pci/vfio_pci_rdwr.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/vf

[PATCH 2/3] vfio/pci: Use endian neutral helpers

2018-02-28 Thread Alex Williamson
change other than big endian systems aren't penalized with wasted swaps. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_rdwr.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci

[PATCH 1/3] vfio/pci: Pull BAR mapping setup from read-write path

2018-02-28 Thread Alex Williamson
This creates a common helper that we'll use for ioeventfd setup. Signed-off-by: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/pci/vfio_pci_rdwr.c | 39 ++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/vf

[PATCH 1/3] vfio/pci: Pull BAR mapping setup from read-write path

2018-02-28 Thread Alex Williamson
This creates a common helper that we'll use for ioeventfd setup. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_rdwr.c | 39 ++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci

[PATCH 0/3] vfio/pci: ioeventfd support

2018-02-28 Thread Alex Williamson
ing the endian nature of this interface. * Rebase to v4.16-rc3 Thanks, Alex --- Alex Williamson (3): vfio/pci: Pull BAR mapping setup from read-write path vfio/pci: Use endian neutral helpers vfio/pci: Add ioeventfd support drivers/vfio/pci/vfio_pci.c | 34 ++ driv

[PATCH 0/3] vfio/pci: ioeventfd support

2018-02-28 Thread Alex Williamson
ing the endian nature of this interface. * Rebase to v4.16-rc3 Thanks, Alex --- Alex Williamson (3): vfio/pci: Pull BAR mapping setup from read-write path vfio/pci: Use endian neutral helpers vfio/pci: Add ioeventfd support drivers/vfio/pci/vfio_pci.c | 34 ++ driv

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-28 Thread Alex Williamson
t; >> Sent: Wednesday, February 28, 2018 9:02 AM > >> To: Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com>; > >> Alex Williamson <alex.william...@redhat.com> > >> Cc: pmo...@linux.vnet.ibm.com; k...@vger.kernel.org; linux- > >> ker

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-28 Thread Alex Williamson
y, February 28, 2018 9:02 AM > >> To: Shameerali Kolothum Thodi ; > >> Alex Williamson > >> Cc: pmo...@linux.vnet.ibm.com; k...@vger.kernel.org; linux- > >> ker...@vger.kernel.org; Linuxarm ; John Garry > >> ; xuwei (O) ; Robin Murphy > >> >

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-02-27 Thread Alex Williamson
On Tue, 27 Feb 2018 11:06:54 -0800 Alexander Duyck wrote: > From: Alexander Duyck > > This patch is meant to add support for SR-IOV on devices when the VFs are > not managed by the kernel. Examples of recent patches attempting to do this

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-02-27 Thread Alex Williamson
On Tue, 27 Feb 2018 11:06:54 -0800 Alexander Duyck wrote: > From: Alexander Duyck > > This patch is meant to add support for SR-IOV on devices when the VFs are > not managed by the kernel. Examples of recent patches attempting to do this > include: It appears to enable sriov when the _pf_ is

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-27 Thread Alex Williamson
On Tue, 27 Feb 2018 09:57:16 + Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com> wrote: > > -Original Message- > > From: Auger Eric [mailto:eric.au...@redhat.com] > > Sent: Tuesday, February 27, 2018 8:27 AM > > To: Alex Williamson <a

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-27 Thread Alex Williamson
On Tue, 27 Feb 2018 09:57:16 + Shameerali Kolothum Thodi wrote: > > -Original Message- > > From: Auger Eric [mailto:eric.au...@redhat.com] > > Sent: Tuesday, February 27, 2018 8:27 AM > > To: Alex Williamson > > Cc: Shameerali Kolothum Thodi ; &g

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-27 Thread Alex Williamson
On Tue, 27 Feb 2018 09:26:37 +0100 Auger Eric <eric.au...@redhat.com> wrote: > Hi, > On 27/02/18 00:13, Alex Williamson wrote: > > On Mon, 26 Feb 2018 23:05:43 +0100 > > Auger Eric <eric.au...@redhat.com> wrote: > > > >> Hi Shameer, > >

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-27 Thread Alex Williamson
On Tue, 27 Feb 2018 09:26:37 +0100 Auger Eric wrote: > Hi, > On 27/02/18 00:13, Alex Williamson wrote: > > On Mon, 26 Feb 2018 23:05:43 +0100 > > Auger Eric wrote: > > > >> Hi Shameer, > >> > >> [Adding Robin in CC] > >> On

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-26 Thread Alex Williamson
On Mon, 26 Feb 2018 23:05:43 +0100 Auger Eric wrote: > Hi Shameer, > > [Adding Robin in CC] > On 21/02/18 13:22, Shameer Kolothum wrote: > > This checks and rejects any dma map request outside valid iova > > range. > > > > Signed-off-by: Shameer Kolothum

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-26 Thread Alex Williamson
On Mon, 26 Feb 2018 23:05:43 +0100 Auger Eric wrote: > Hi Shameer, > > [Adding Robin in CC] > On 21/02/18 13:22, Shameer Kolothum wrote: > > This checks and rejects any dma map request outside valid iova > > range. > > > > Signed-off-by: Shameer Kolothum > > --- > >

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

2018-02-26 Thread Alex Williamson
On Sat, 24 Feb 2018 13:44:07 +0800 jason 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

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

2018-02-26 Thread Alex Williamson
On Sat, 24 Feb 2018 13:44:07 +0800 jason 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 has flags

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

2018-02-23 Thread Alex Williamson
On Fri, 23 Feb 2018 08:20:51 + "Tian, Kevin" <kevin.t...@intel.com> wrote: > > From: Alex Williamson > > Sent: Friday, February 23, 2018 6:59 AM > > > > On Thu, 1 Feb 2018 01:27:38 -0500 > > Suravee Suthikulpanit <suravee.suthikulpa...@amd.co

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

2018-02-23 Thread Alex Williamson
On Fri, 23 Feb 2018 08:20:51 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Friday, February 23, 2018 6:59 AM > > > > On Thu, 1 Feb 2018 01:27:38 -0500 > > Suravee Suthikulpanit wrote: > > > > > VFIO IOMMU

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

2018-02-22 Thread Alex Williamson
ugh devices has a large number of mapped > IOVAs. This can be avoided by using the new IOTLB flushing interface. > > Cc: Alex Williamson <alex.william...@redhat.com> > Cc: Joerg Roedel <j...@8bytes.org> > Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa.

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

2018-02-22 Thread Alex Williamson
of mapped > IOVAs. This can be avoided by using the new IOTLB flushing interface. > > Cc: Alex Williamson > Cc: Joerg Roedel > Signed-off-by: Suravee Suthikulpanit > --- > > Changes from v4 (https://lkml.org/lkml/2018/1/31/153) > * Change return type from ssize

Re: [PATCH v4 5/6] vfio/type1: Add IOVA range capability support

2018-02-22 Thread Alex Williamson
On Wed, 21 Feb 2018 12:22:08 + Shameer Kolothum wrote: > This allows the user-space to retrieve the supported IOVA > range(s), excluding any reserved regions. The implementation > is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. > >

Re: [PATCH v4 5/6] vfio/type1: Add IOVA range capability support

2018-02-22 Thread Alex Williamson
On Wed, 21 Feb 2018 12:22:08 + Shameer Kolothum wrote: > This allows the user-space to retrieve the supported IOVA > range(s), excluding any reserved regions. The implementation > is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. > > Signed-off-by: Shameer Kolothum > ---

Re: [PATCH v3 1/6] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-02-19 Thread Alex Williamson
On Mon, 19 Feb 2018 09:50:24 + Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com> wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, February 16, 2018 8:49 PM > > On Thu, 15 Feb 2

Re: [PATCH v3 1/6] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-02-19 Thread Alex Williamson
On Mon, 19 Feb 2018 09:50:24 + Shameerali Kolothum Thodi wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, February 16, 2018 8:49 PM > > On Thu, 15 Feb 2018 09:44:59 + >

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

2018-02-19 Thread Alex Williamson
On Mon, 19 Feb 2018 10:00:53 + Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com> wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, February 16, 2018 9:18 PM > > > >

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

2018-02-19 Thread Alex Williamson
On Mon, 19 Feb 2018 10:00:53 + Shameerali Kolothum Thodi wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, February 16, 2018 9:18 PM > > > > On Thu, 15 Feb 2018 09:45:00 +00

Re: [PATCH v3 5/6] vfio/type1: Add IOVA range capability support

2018-02-16 Thread Alex Williamson
On Thu, 15 Feb 2018 09:45:03 + Shameer Kolothum wrote: > This allows the user-space to retrieve the supported IOVA > range(s), excluding any reserved regions. The implementation > is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. > >

Re: [PATCH v3 5/6] vfio/type1: Add IOVA range capability support

2018-02-16 Thread Alex Williamson
On Thu, 15 Feb 2018 09:45:03 + Shameer Kolothum wrote: > This allows the user-space to retrieve the supported IOVA > range(s), excluding any reserved regions. The implementation > is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. > > Signed-off-by: Shameer Kolothum > ---

<    5   6   7   8   9   10   11   12   13   14   >