Re: [PATCH 1/3] vfio/type1: Support faulting PFNMAP vmas

2020-05-04 Thread Alex Williamson
On Fri, 1 May 2020 20:50:33 -0300 Jason Gunthorpe wrote: > On Fri, May 01, 2020 at 03:39:08PM -0600, Alex Williamson wrote: > > With conversion to follow_pfn(), DMA mapping a PFNMAP range depends on > > the range being faulted into the vma. Add support to manually provide > &

[GIT PULL] VFIO fixes for v5.7-rc4

2020-05-01 Thread Alex Williamson
Hi Linus, The following changes since commit ae83d0b416db002fe95601e7f97f64b59514d936: Linux 5.7-rc2 (2020-04-19 14:35:30 -0700) are available in the Git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v5.7-rc4 for you to fetch changes up to

[PATCH] vfio-pci: Mask cap zero

2020-05-01 Thread Alex Williamson
mark our capability map with nonsense that can trigger conflicts with other capabilities in the chain. Ignore ID 0 when walking the capability chain, handling it as a hidden capability. Seen on an NVIDIA Tesla T4. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_config.c |2

[PATCH 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory

2020-05-01 Thread Alex Williamson
to be compatible with known use cases and potentially provides better error handling capabilities than present in the hardware, while avoiding the more readily accessible and severe platform error responses that might otherwise occur. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c

[PATCH 1/3] vfio/type1: Support faulting PFNMAP vmas

2020-05-01 Thread Alex Williamson
With conversion to follow_pfn(), DMA mapping a PFNMAP range depends on the range being faulted into the vma. Add support to manually provide that, in the same way as done on KVM with hva_to_pfn_remapped(). Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c | 36

[PATCH 2/3] vfio-pci: Fault mmaps to enable vma tracking

2020-05-01 Thread Alex Williamson
range so that all tracking is inserted in the fault handler and removed in the close handler. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 76 ++- drivers/vfio/pci/vfio_pci_private.h |7 +++ 2 files changed, 81 insertions(+), 2

[PATCH 0/3] vfio-pci: Block user access to disabled device MMIO

2020-05-01 Thread Alex Williamson
experience regressions, but without known code requiring that, SIGBUS seems the appropriate response to this condition. Thanks, Alex --- Alex Williamson (3): vfio/type1: Support faulting PFNMAP vmas vfio-pci: Fault mmaps to enable vma tracking vfio-pci: Invalidate mmaps and block

Re: [regression?] Re: [PATCH v6 06/12] mm/gup: track FOLL_PIN pages

2020-04-29 Thread Alex Williamson
On Tue, 28 Apr 2020 21:29:03 -0300 Jason Gunthorpe wrote: > On Tue, Apr 28, 2020 at 02:12:23PM -0600, Alex Williamson wrote: > > > > > Maybe I was just getting lucky before this commit. For a > > > > VM_PFNMAP, vaddr_get_pfn() only needs pin_user_pages_re

Re: [regression?] Re: [PATCH v6 06/12] mm/gup: track FOLL_PIN pages

2020-04-28 Thread Alex Williamson
On Tue, 28 Apr 2020 16:22:51 -0300 Jason Gunthorpe wrote: > On Tue, Apr 28, 2020 at 01:07:52PM -0600, Alex Williamson wrote: > > On Tue, 28 Apr 2020 14:49:57 -0300 > > Jason Gunthorpe wrote: > > > > > On Tue, Apr 28, 2020 at 10:54:55AM -0600, Alex Williamso

Re: [regression?] Re: [PATCH v6 06/12] mm/gup: track FOLL_PIN pages

2020-04-28 Thread Alex Williamson
On Tue, 28 Apr 2020 14:49:57 -0300 Jason Gunthorpe wrote: > On Tue, Apr 28, 2020 at 10:54:55AM -0600, Alex Williamson wrote: > > static int vfio_pci_mmap(void *device_data, struct vm_area_struct *vma) > > { > > struct vfio_pci_device *vdev = device_data; > > @@

Re: [regression?] Re: [PATCH v6 06/12] mm/gup: track FOLL_PIN pages

2020-04-28 Thread Alex Williamson
On Fri, 24 Apr 2020 15:58:29 -0700 John Hubbard wrote: > On 2020-04-24 13:15, Alex Williamson wrote: > > On Fri, 24 Apr 2020 12:20:03 -0700 > > John Hubbard wrote: > > > >> On 2020-04-24 11:18, Alex Williamson wrote: > >> ... > >>> Hi John

[GIT PULL] VFIO fixes for v5.4-rc5

2019-10-23 Thread Alex Williamson
Hi Linus, The following changes since commit 4f5cafb5cb8471e54afdc9054d973535614f7675: Linux 5.4-rc3 (2019-10-13 16:37:36 -0700) are available in the Git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v5.4-rc5 for you to fetch changes up to

Re: [PATCH] vfio/type1: Initialize resv_msi_base

2019-10-18 Thread Alex Williamson
On Tue, 15 Oct 2019 17:16:50 +0200 Joerg Roedel wrote: > From: Joerg Roedel > > After enabling CONFIG_IOMMU_DMA on X86 a new warning appears when > compiling vfio: > > drivers/vfio/vfio_iommu_type1.c: In function ‘vfio_iommu_type1_attach_group’: > drivers/vfio/vfio_iommu_type1.c:1827:7:

Re: [PATCH] vfio/type1: remove hugepage checks in is_invalid_reserved_pfn()

2019-10-18 Thread Alex Williamson
On Fri, 18 Oct 2019 14:42:32 +0800 Ben Luo wrote: > A friendly reminder :) > Thanks Ben! I've added this to the vfio next branch for v5.5 with Andrea's R-b. Thanks, Alex > 在 2019/10/4 上午12:41, Andrea Arcangeli 写道: > > On Thu, Oct 03, 2019 at 11:49:42AM +0800, Ben Luo wrote: > >>

Re: [PATCH RFC 0/1] VFIO: Region-specific file descriptors

2019-10-01 Thread Alex Williamson
On Mon, 30 Sep 2019 18:55:32 -0500 Shawn Anastasio wrote: > This patch adds region file descriptors to VFIO, a simple file descriptor type > that allows read/write/mmap operations on a single region of a VFIO device. > > This feature is particularly useful for privileged applications that use

Re: [PATCH v2 13/13] vfio/type1: track iommu backed group attach

2019-09-30 Thread Alex Williamson
On Mon, 30 Sep 2019 12:41:03 + "Liu, Yi L" wrote: > Hi Alex, > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, September 26, 2019 10:37 AM > > To: Liu, Yi L > > Subject: Re: [PATCH v2 13/13] vfio/type1: track iommu

Re: [PATCH v2 13/13] vfio/type1: track iommu backed group attach

2019-09-25 Thread Alex Williamson
As the vfio_domain.group_obj_list is within vfio container(vfio_iommu) > scope, if user wants to passthru a non-singleton to multiple VMs, it > will be failed as VMs will have separate vfio containers. Also, if > vIOMMU is exposed, it will also fail the attempts of assigning multipl

Re: [PATCH v2 12/13] vfio/type1: use iommu_attach_group() for wrapping PF/VF as mdev

2019-09-25 Thread Alex Williamson
dev can work on non-singleton iommu groups. > > Cc: Kevin Tian > Cc: Lu Baolu > Suggested-by: Alex Williamson > Signed-off-by: Liu Yi L > --- > drivers/vfio/vfio_iommu_type1.c | 22 ++ > 1 file changed, 18 insertions(+), 4 deletions(-) > > diff

Re: [PATCH v2 10/13] samples: refine vfio-mdev-pci driver

2019-09-25 Thread Alex Williamson
On Thu, 5 Sep 2019 15:59:27 +0800 Liu Yi L wrote: > From: Alex Williamson > > This patch refines the implementation of original vfio-mdev-pci driver. > > And the vfio-mdev-pci-type_name will be named per the following rule: > > vmdev->attr.nam

Re: [PATCH v2 11/13] samples/vfio-mdev-pci: call vfio_add_group_dev()

2019-09-25 Thread Alex Williamson
On Thu, 5 Sep 2019 15:59:28 +0800 Liu Yi L wrote: > This patch adds vfio_add_group_dev() calling in probe() to make > vfio-mdev-pci work well with non-singleton iommu group. User could > bind devices from a non-singleton iommu group to either vfio-pci > driver or this sample driver. Existing

Re: [PATCH v2 08/13] vfio/pci: protect cap/ecap_perm bits alloc/free with atomic op

2019-09-25 Thread Alex Williamson
c: Lu Baolu > Suggested-by: Alex Williamson > Signed-off-by: Liu Yi L > --- > drivers/vfio/pci/vfio_pci_config.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/vfio/pci/vfio_pci_config.c > b/drivers/vfio/pci/vfio_pci_config.c > ind

Re: [PATCH v2 02/13] vfio_pci: refine user config reference in vfio-pci module

2019-09-25 Thread Alex Williamson
On Thu, 5 Sep 2019 15:59:19 +0800 Liu Yi L wrote: > This patch adds three fields in struct vfio_pci_device to pass the user > configs of vfio-pci module to some functions which could be common in > future usage. > > Cc: Kevin Tian > Cc: Lu Baolu > Signed-off-by: Liu Yi L > --- >

Re: [PATCH v6 2/6] vfio: Introduce vGPU display irq type

2019-09-24 Thread Alex Williamson
On Tue, 24 Sep 2019 14:41:39 +0800 Tina Zhang wrote: > Introduce vGPU specific irq type VFIO_IRQ_TYPE_GFX, and > VFIO_IRQ_SUBTYPE_GFX_DISPLAY_IRQ as the subtype for vGPU display. > > Introduce vfio_irq_info_cap_display_plane_events capability to notify > user space with the vGPU's plane update

Re: [PATCH v6 5/6] drm/i915/gvt: Deliver async primary plane page flip events at vblank

2019-09-24 Thread Alex Williamson
On Tue, 24 Sep 2019 14:41:42 +0800 Tina Zhang wrote: > From: Kechen Lu > > Only sync primary plane page flip events are checked and delivered > as the display refresh events before, this patch tries to deliver async > primary page flip events bounded by vblanks. > > To deliver correct async

Re: [PATCH v6 4/6] drm/i915/gvt: Deliver vGPU refresh event to userspace

2019-09-24 Thread Alex Williamson
On Tue, 24 Sep 2019 14:41:41 +0800 Tina Zhang wrote: > Deliver the display refresh events to the user land. Userspace can use > the irq mask/unmask mechanism to disable or enable the event delivery. > > As we know, delivering refresh event at each vblank safely avoids > tearing and unexpected

Re: [PATCH 5/6] vringh: fix copy direction of vringh_iov_push_kern()

2019-09-23 Thread Alex Williamson
On Mon, 23 Sep 2019 21:03:30 +0800 Jason Wang wrote: > We want to copy from iov to buf, so the direction was wrong. > > Signed-off-by: Jason Wang > --- > drivers/vhost/vringh.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Why is this included in the series? Seems like an

[GIT PULL] VFIO updates for v5.4-rc1

2019-09-20 Thread Alex Williamson
) - Simplify mtty sample driver interrupt path (Parav Pandit) - Support for reporting valid IOVA regions to user (Shameer Kolothum) Alex Williamson (1): Merge branches 'v5.4/vfio/alexey-tce-memory-free-v1', 'v5.4/vfio/connie

Re: [PATCH v4 3/4] vfio: zpci: defining the VFIO headers

2019-09-19 Thread Alex Williamson
On Thu, 19 Sep 2019 16:55:57 -0400 Matthew Rosato wrote: > On 9/19/19 11:20 AM, Cornelia Huck wrote: > > On Fri, 6 Sep 2019 20:13:50 -0400 > > Matthew Rosato wrote: > > > >> From: Pierre Morel > >> > >> We define a new device region in vfio.h to be able to > >> get the ZPCI CLP information

Re: [PATCH] sample: vfio mdev display - Fix a missing error code in an error handling path

2019-09-18 Thread Alex Williamson
On Mon, 16 Sep 2019 22:22:40 +0200 Christophe JAILLET wrote: > 'ret' is known to be 0 at this point. So explicitly set it to -ENOMEM if > 'framebuffer_alloc()' fails. > > Signed-off-by: Christophe JAILLET > --- > samples/vfio-mdev/mdpy-fb.c | 4 +++- > 1 file changed, 3 insertions(+), 1

Re: [RFC PATCH 2/4] mdev: introduce helper to set per device dma ops

2019-09-17 Thread Alex Williamson
On Tue, 10 Sep 2019 16:19:33 +0800 Jason Wang wrote: > This patch introduces mdev_set_dma_ops() which allows parent to set > per device DMA ops. This help for the kernel driver to setup a correct > DMA mappings. > > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/mdev_core.c | 7 +++ >

Re: [PATCH 00/11] KVM: x86/mmu: Restore fast invalidate/zap flow

2019-09-16 Thread Alex Williamson
t'll likely need to be applied to > stable branches, assuming it works. Thanks! It looks like Paolo already included patch 01/11 in v5.3, I tested that and it behaves ok for the GPU assignment windows issue. I applied the remaining 10 patches on v5.3 and tested those separately. They also beh

Re: [RFC V1 3/7] x86/ims: Add support for a new IMS irq domain

2019-09-13 Thread Alex Williamson
On Thu, 12 Sep 2019 18:32:04 -0700 Megha Dey wrote: > This patch adds support for the creation of a new IMS irq domain. It > creates a new irq_chip associated with the IMS domain and adds the > necessary domain operations to it. > > Cc: Jacob Pan > Signed-off-by: Sanjay Kumar > Signed-off-by:

Re: [PATCH v3 0/5] Introduce variable length mdev alias

2019-09-13 Thread Alex Williamson
On Wed, 11 Sep 2019 16:38:49 + Parav Pandit wrote: > > -Original Message- > > From: linux-kernel-ow...@vger.kernel.org > ow...@vger.kernel.org> On Behalf Of Parav Pandit > > Sent: Wednesday, September 11, 2019 10:31 AM > > To: Alex Williamso

Re: [PATCH v2] vfio/type1: avoid redundant PageReserved checking

2019-09-13 Thread Alex Williamson
On Mon, 2 Sep 2019 15:32:42 +0800 Ben Luo wrote: > 在 2019/8/30 上午1:06, Alex Williamson 写道: > > On Fri, 30 Aug 2019 00:58:22 +0800 > > Ben Luo wrote: > > > >> 在 2019/8/28 下午11:55, Alex Williamson 写道: > >>> On Wed, 28 Aug 2019 12:28:04 +0800 > &g

Re: [PATCH v6 0/3] genirq/vfio: Introduce irq_update_devid() and optimize VFIO irq ops

2019-09-13 Thread Alex Williamson
On Tue, 10 Sep 2019 14:30:16 +0800 Ben Luo wrote: > A friendly reminder. The vfio patch looks ok to me. Thomas, do you have further comments or a preference on how to merge these? I'd tend to prefer the vfio changes through my branch for testing and can pull the irq changes with your

Re: [PATCH v3 0/5] Introduce variable length mdev alias

2019-09-11 Thread Alex Williamson
t sure what we do with this patch series though, has the real consumer of this even been proposed? It feels optimistic to include at this point. We've used the sample driver as a placeholder in the past for mdev_uuid(), but we arrived at that via a conversion rather than explicitly adding the

Re: [PATCH] PCI: Add PCIE ACS quirk for IPROC PAXB

2019-09-05 Thread Alex Williamson
On Thu, 5 Sep 2019 17:26:49 -0500 Bjorn Helgaas wrote: > [+cc Alex] > > On Tue, Aug 20, 2019 at 10:09:45AM +0530, Srinath Mannam wrote: > > From: Abhinav Ratna > > > > IPROC PAXB RC doesn't support ACS capabilities and control registers. > > Add quirk to have separate IOMMU groups for all EPs

Re: [PATCH v5 3/3] vfio/pci: make use of irq_update_devid and optimize irq ops

2019-08-30 Thread Alex Williamson
On Fri, 30 Aug 2019 16:42:06 +0800 Ben Luo wrote: > When userspace (e.g. qemu) triggers a switch between KVM > irqfd and userspace eventfd, only dev_id of irqaction > (i.e. the "trigger" in this patch's context) will be > changed, but a free-then-request-irq action is taken in > current code.

Re: [PATCH v2] vfio/type1: avoid redundant PageReserved checking

2019-08-29 Thread Alex Williamson
On Fri, 30 Aug 2019 00:58:22 +0800 Ben Luo wrote: > 在 2019/8/28 下午11:55, Alex Williamson 写道: > > On Wed, 28 Aug 2019 12:28:04 +0800 > > Ben Luo wrote: > > > >> currently, if the page is not a tail of compound page, it will be > >> checked twice for the s

Re: [PATCH v4 3/3] vfio/pci: make use of irq_update_devid and optimize irq ops

2019-08-29 Thread Alex Williamson
On Thu, 29 Aug 2019 13:40:59 +0800 Ben Luo wrote: > 在 2019/8/29 上午1:23, Alex Williamson 写道: > > On Wed, 28 Aug 2019 18:08:02 +0800 > > Ben Luo wrote: > > > >> 在 2019/8/28 上午4:33, Alex Williamson 写道: > >>> On Thu, 22 Aug 2019 23:34:43 +0800 &g

Re: [PATCH v1 2/5] mdev: Make mdev alias unique among all mdevs

2019-08-28 Thread Alex Williamson
On Tue, 27 Aug 2019 14:16:51 -0500 Parav Pandit wrote: > Mdev alias should be unique among all the mdevs, so that when such alias > is used by the mdev users to derive other objects, there is no > collision in a given system. > > Signed-off-by: Parav Pandit > > --- > Changelog: > v0->v1: > -

Re: [PATCH v1 1/5] mdev: Introduce sha1 based mdev alias

2019-08-28 Thread Alex Williamson
On Wed, 28 Aug 2019 15:25:44 -0600 Alex Williamson wrote: > On Tue, 27 Aug 2019 14:16:50 -0500 > Parav Pandit wrote: > > module_init(mdev_init) > > diff --git a/drivers/vfio/mdev/mdev_private.h > > b/drivers/vfio/mdev/mdev_private.h > > index 7d9

Re: [PATCH v1 1/5] mdev: Introduce sha1 based mdev alias

2019-08-28 Thread Alex Williamson
On Tue, 27 Aug 2019 14:16:50 -0500 Parav Pandit wrote: > Some vendor drivers want an identifier for an mdev device that is > shorter than the UUID, due to length restrictions in the consumers of > that identifier. > > Add a callback that allows a vendor driver to request an alias of a >

Re: [PATCH v4 3/3] vfio/pci: make use of irq_update_devid and optimize irq ops

2019-08-28 Thread Alex Williamson
On Wed, 28 Aug 2019 18:08:02 +0800 Ben Luo wrote: > 在 2019/8/28 上午4:33, Alex Williamson 写道: > > On Thu, 22 Aug 2019 23:34:43 +0800 > > Ben Luo wrote: > > > >> When userspace (e.g. qemu) triggers a switch between KVM > >> irqfd and userspace event

Re: [PATCH v2] vfio/type1: avoid redundant PageReserved checking

2019-08-28 Thread Alex Williamson
On Wed, 28 Aug 2019 12:28:04 +0800 Ben Luo wrote: > currently, if the page is not a tail of compound page, it will be > checked twice for the same thing. > > Signed-off-by: Ben Luo > --- > drivers/vfio/vfio_iommu_type1.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff

Re: [PATCH v4 3/3] vfio/pci: make use of irq_update_devid and optimize irq ops

2019-08-27 Thread Alex Williamson
On Thu, 22 Aug 2019 23:34:43 +0800 Ben Luo wrote: > When userspace (e.g. qemu) triggers a switch between KVM > irqfd and userspace eventfd, only dev_id of irq action > (i.e. the "trigger" in this patch's context) will be > changed, but a free-then-request-irq action is taken in > current code.

Re: [PATCH] vfio/type1: avoid redundant PageReserved checking

2019-08-27 Thread Alex Williamson
On Tue, 27 Aug 2019 20:49:48 +0800 Ben Luo wrote: > currently, if the page is not a tail of compound page, it will be > checked twice for the same thing. > > Signed-off-by: Ben Luo > --- > drivers/vfio/vfio_iommu_type1.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff

Re: [PATCH 0/4] Introduce variable length mdev alias

2019-08-27 Thread Alex Williamson
On Tue, 27 Aug 2019 13:11:17 + Parav Pandit wrote: > Hi Alex, Cornelia, > > > -Original Message- > > From: kvm-ow...@vger.kernel.org On Behalf > > Of Parav Pandit > > Sent: Tuesday, August 27, 2019 2:11 AM > > To: alex.william...@redhat.com; Jiri Pirko ; > > kwankh...@nvidia.com;

Re: [PATCH 1/4] mdev: Introduce sha1 based mdev alias

2019-08-27 Thread Alex Williamson
On Tue, 27 Aug 2019 15:35:10 +0200 Cornelia Huck wrote: > On Tue, 27 Aug 2019 11:57:07 + > Parav Pandit wrote: > > > > -Original Message- > > > From: Cornelia Huck > > > Sent: Tuesday, August 27, 2019 5:11 PM > > > To: Parav Pandit > > > Cc: alex.william...@redhat.com; Jiri Pirko

Re: [PATCH 2/4] mdev: Make mdev alias unique among all mdevs

2019-08-27 Thread Alex Williamson
On Tue, 27 Aug 2019 16:13:27 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Tuesday, August 27, 2019 8:59 PM > > To: Cornelia Huck > > Cc: Parav Pandit ; Jiri Pirko ; > > kwankh...@nvidia.com; da...@daveml

Re: [PATCH 2/4] mdev: Make mdev alias unique among all mdevs

2019-08-27 Thread Alex Williamson
On Tue, 27 Aug 2019 13:29:46 +0200 Cornelia Huck wrote: > On Tue, 27 Aug 2019 11:08:59 + > Parav Pandit wrote: > > > > -Original Message- > > > From: Cornelia Huck > > > Sent: Tuesday, August 27, 2019 3:59 PM > > > To: Parav Pandit > > > Cc: alex.william...@redhat.com; Jiri Pirko

Re: [PATCH 2/4] mdev: Make mdev alias unique among all mdevs

2019-08-27 Thread Alex Williamson
On Tue, 27 Aug 2019 04:28:37 + Parav Pandit wrote: > Hi Mark, > > > -Original Message- > > From: Mark Bloch > > Sent: Tuesday, August 27, 2019 4:32 AM > > To: Parav Pandit ; alex.william...@redhat.com; Jiri > > Pirko ; kwankh...@nvidia.com; coh...@redhat.com; > >

Re: [PATCH 3/4] mdev: Expose mdev alias in sysfs tree

2019-08-26 Thread Alex Williamson
On Mon, 26 Aug 2019 15:41:18 -0500 Parav Pandit wrote: > Expose mdev alias as string in a sysfs tree so that such attribute can > be used to generate netdevice name by systemd/udev or can be used to > match other kernel objects based on the alias of the mdev. > > Signed-off-by: Parav Pandit >

Re: [PATCH 1/4] mdev: Introduce sha1 based mdev alias

2019-08-26 Thread Alex Williamson
On Mon, 26 Aug 2019 19:44:56 -0600 Alex Williamson wrote: > On Mon, 26 Aug 2019 15:41:16 -0500 > Parav Pandit wrote: > > > Whenever a parent requests to generate mdev alias, generate a mdev > > alias. > > It is an optional attribute that parent can request to generat

Re: [PATCH 1/4] mdev: Introduce sha1 based mdev alias

2019-08-26 Thread Alex Williamson
On Mon, 26 Aug 2019 15:41:16 -0500 Parav Pandit wrote: > Whenever a parent requests to generate mdev alias, generate a mdev > alias. > It is an optional attribute that parent can request to generate > for each of its child mdev. > mdev alias is generated using sha1 from the mdev name. > >

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-23 Thread Alex Williamson
On Sat, 24 Aug 2019 03:56:08 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Saturday, August 24, 2019 1:14 AM > > To: Parav Pandit > > Cc: Jiri Pirko ; Jiri Pirko ; David S > > . Miller > >

Re: [PATCH v2] vfio: re-arrange vfio region definitions

2019-08-23 Thread Alex Williamson
On Wed, 14 Aug 2019 11:52:14 -0600 Alex Williamson wrote: > On Tue, 6 Aug 2019 11:30:00 +0200 > Cornelia Huck wrote: > > > It is easy to miss already defined region types. Let's re-arrange > > the definitions a bit and add more comments to make it hopefu

Re: [PATCH v2 1/2] vfio-mdev/mtty: Simplify interrupt generation

2019-08-23 Thread Alex Williamson
On Thu, 8 Aug 2019 09:12:54 -0500 Parav Pandit wrote: > While generating interrupt, mdev_state is already available for which > interrupt is generated. > Instead of doing indirect way from state->device->uuid-> to searching > state linearly in linked list on every interrupt generation, >

Re: [PATCH v3] vfio_pci: Restore original state on release

2019-08-23 Thread Alex Williamson
On Thu, 22 Aug 2019 11:35:19 +0800 hexin wrote: > vfio_pci_enable() saves the device's initial configuration information > with the intent that it is restored in vfio_pci_disable(). However, > the commit referenced in Fixes: below replaced the call to > __pci_reset_function_locked(), which is

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-23 Thread Alex Williamson
On Fri, 23 Aug 2019 18:00:30 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Friday, August 23, 2019 10:47 PM > > To: Parav Pandit > > Cc: Jiri Pirko ; Jiri Pirko ; David S > > . Miller > >

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-23 Thread Alex Williamson
On Fri, 23 Aug 2019 16:14:04 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Friday, August 23, 2019 9:22 PM > > To: Parav Pandit > > Cc: Jiri Pirko ; Jiri Pirko ; David S > > . Miller > > ; Kirti Wankhede

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-23 Thread Alex Williamson
On Fri, 23 Aug 2019 14:53:06 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Friday, August 23, 2019 7:58 PM > > To: Parav Pandit > > Cc: Jiri Pirko ; Jiri Pirko ; David S > > . Miller > > ; Kirti Wankhede

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-23 Thread Alex Williamson
On Fri, 23 Aug 2019 08:14:39 + Parav Pandit wrote: > Hi Alex, > > > > -Original Message- > > From: Jiri Pirko > > Sent: Friday, August 23, 2019 1:42 PM > > To: Parav Pandit > > Cc: Alex Williamson ; Jiri Pirko > > ; David S . Miller

Re: [PATCH v2] vfio_pci: Replace pci_try_reset_function() with __pci_reset_function_locked() to ensure that the pci device configuration space is restored to its original state

2019-08-21 Thread Alex Williamson
On Wed, 21 Aug 2019 23:13:08 +0800 hexin wrote: > Alex Williamson 于2019年8月20日周二 上午3:53写道: > > > > On Sat, 17 Aug 2019 19:51:03 +0800 > > hexin wrote: > > > > > In vfio_pci_enable(), save the device's initial configuration information >

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-20 Thread Alex Williamson
On Wed, 21 Aug 2019 05:01:52 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Wednesday, August 21, 2019 10:27 AM > > To: Parav Pandit > > Cc: Jiri Pirko ; David S . Miller ; > > Kirti Wankhede ; Cornelia Huck >

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-20 Thread Alex Williamson
On Wed, 21 Aug 2019 04:40:15 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Wednesday, August 21, 2019 9:51 AM > > To: Parav Pandit > > Cc: Jiri Pirko ; David S . Miller ; > > Kirti Wankhede ; Cornelia Huck >

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-20 Thread Alex Williamson
On Wed, 21 Aug 2019 03:42:25 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Tuesday, August 20, 2019 10:49 PM > > To: Parav Pandit > > Cc: Jiri Pirko ; David S . Miller ; > > Kirti Wankhede ; Cornelia Huck >

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-20 Thread Alex Williamson
On Tue, 20 Aug 2019 08:58:02 + Parav Pandit wrote: > + Dave. > > Hi Jiri, Dave, Alex, Kirti, Cornelia, > > Please provide your feedback on it, how shall we proceed? > > Short summary of requirements. > For a given mdev (mediated device [1]), there is one representor > netdevice and

Re: [PATCH v5 2/6] vfio: Introduce vGPU display irq type

2019-08-20 Thread Alex Williamson
On Tue, 20 Aug 2019 02:12:10 + "Zhang, Tina" wrote: > BTW, IIRC, we might also have one question waiting to be replied: > - Can we just use VFIO_IRQ_TYPE_GFX w/o proposing a new sub type > (i.e. VFIO_IRQ_SUBTYPE_GFX_DISPLAY_IRQ)? Well, only if we can agree > on that we don't have any other

Re: [PATCH v3 0/3] genirq/vfio: Introduce update_irq_devid and optimize VFIO irq ops

2019-08-20 Thread Alex Williamson
On Tue, 20 Aug 2019 12:03:50 +0800 luoben wrote: > 在 2019/8/20 上午4:51, Alex Williamson 写道: > > On Thu, 15 Aug 2019 21:02:58 +0800 > > Ben Luo wrote: > > > >> Currently, VFIO takes a lot of free-then-request-irq actions whenever > >> a VM (with devi

Re: [PATCH v5 2/6] vfio: Introduce vGPU display irq type

2019-08-20 Thread Alex Williamson
On Tue, 20 Aug 2019 09:20:30 +0200 "kra...@redhat.com" wrote: > > > > +#define VFIO_IRQ_TYPE_GFX (1) > > > > +/* > > > > + * vGPU vendor sub-type > > > > + * vGPU device display related interrupts e.g. vblank/pageflip */ > > > > +#define

Re: [PATCH v3 0/3] genirq/vfio: Introduce update_irq_devid and optimize VFIO irq ops

2019-08-19 Thread Alex Williamson
On Thu, 15 Aug 2019 21:02:58 +0800 Ben Luo wrote: > Currently, VFIO takes a lot of free-then-request-irq actions whenever > a VM (with device passthru via VFIO) sets irq affinity or mask/unmask > irq. Those actions only change the cookie data of irqaction or even > change nothing. The

Re: [PATCH v2] vfio_pci: Replace pci_try_reset_function() with __pci_reset_function_locked() to ensure that the pci device configuration space is restored to its original state

2019-08-19 Thread Alex Williamson
On Sat, 17 Aug 2019 19:51:03 +0800 hexin wrote: > In vfio_pci_enable(), save the device's initial configuration information > and then restore the configuration in vfio_pci_disable(). However, the > execution result is not the same. Since the pci_try_reset_function() > function saves the current

Re: [PATCH v5 2/6] vfio: Introduce vGPU display irq type

2019-08-16 Thread Alex Williamson
On Fri, 16 Aug 2019 10:35:24 +0800 Tina Zhang wrote: > Introduce vGPU specific irq type VFIO_IRQ_TYPE_GFX, and > VFIO_IRQ_SUBTYPE_GFX_DISPLAY_IRQ as the subtype for vGPU display. > > Introduce vfio_irq_info_cap_display_plane_events capability to notify > user space with the vGPU's plane update

Re: [PATCH v5 1/6] vfio: Define device specific irq type capability

2019-08-16 Thread Alex Williamson
On Fri, 16 Aug 2019 10:35:23 +0800 Tina Zhang wrote: > Cap the number of irqs with fixed indexes and use capability chains > to chain device specific irqs. > > Signed-off-by: Tina Zhang > Signed-off-by: Eric Auger > --- > include/uapi/linux/vfio.h | 19 ++- > 1 file changed,

Re: [PATCH v2 08/10] vfio_pci: Loop using PCI_STD_NUM_BARS

2019-08-16 Thread Alex Williamson
On Fri, 16 Aug 2019 12:24:35 +0300 Denis Efremov wrote: > Refactor loops to use 'i < PCI_STD_NUM_BARS' instead of > 'i <= PCI_STD_RESOURCE_END'. > > Signed-off-by: Denis Efremov > --- > drivers/vfio/pci/vfio_pci.c | 11 +++ > drivers/vfio/pci/vfio_pci_config.c | 10 ++

Re: [PATCH] vfio_pci: Replace pci_try_reset_function() with __pci_reset_function_locked() to ensure that the pci device configuration space is restored to its original state

2019-08-16 Thread Alex Williamson
On Fri, 16 Aug 2019 11:33:47 +0800 hexin wrote: > In vfio_pci_enable(), save the device's initial configuration information > and then restore the configuration in vfio_pci_disable(). However, the > execution result is not the same. Since the pci_try_reset_function() > function saves the current

Re: [PATCH] KVM: x86/MMU: Zap all when removing memslot if VM has assigned device

2019-08-15 Thread Alex Williamson
On Thu, 15 Aug 2019 08:12:28 -0700 Sean Christopherson wrote: > Alex Williamson reported regressions with device assignment when KVM > changed its memslot removal logic to zap only the SPTEs for the memslot > being removed. The source of the bug is unknown at this time, and root

Re: [PATCH v2] vfio: re-arrange vfio region definitions

2019-08-14 Thread Alex Williamson
On Tue, 6 Aug 2019 11:30:00 +0200 Cornelia Huck wrote: > It is easy to miss already defined region types. Let's re-arrange > the definitions a bit and add more comments to make it hopefully > a bit clearer. > > No functional change. > > Signed-off-by: Cornelia Huck > --- > v1 -> v2: > -

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-14 Thread Alex Williamson
On Wed, 14 Aug 2019 13:45:49 + Parav Pandit wrote: > > -Original Message- > > From: Cornelia Huck > > Sent: Wednesday, August 14, 2019 6:39 PM > > To: Parav Pandit > > Cc: Alex Williamson ; Kirti Wankhede > > ; k...@vger.kernel.org;

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-13 Thread Alex Williamson
On Tue, 13 Aug 2019 16:28:53 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Tuesday, August 13, 2019 8:23 PM > > To: Parav Pandit > > Cc: Kirti Wankhede ; k...@vger.kernel.org; linux- > > ker...@vger.kernel.org

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-13 Thread Alex Williamson
On Tue, 13 Aug 2019 14:40:02 + Parav Pandit wrote: > > -Original Message- > > From: Kirti Wankhede > > Sent: Monday, August 12, 2019 5:06 PM > > To: Alex Williamson ; Parav Pandit > > > > Cc: k...@vger.kernel.org; linux-kernel@vger.kernel.org; co

Re: [PATCH 7/7] vfio_pci: Use PCI_STD_NUM_BARS in loops instead of PCI_STD_RESOURCE_END

2019-08-12 Thread Alex Williamson
On Mon, 12 Aug 2019 15:02:34 -0500 Bjorn Helgaas wrote: > On Sun, Aug 11, 2019 at 06:08:04PM +0300, Denis Efremov wrote: > > This patch refactors the loop condition scheme from > > 'i <= PCI_STD_RESOURCE_END' to 'i < PCI_STD_NUM_BARS'. > > > > Signed-off-by: Denis Efremov > > --- > >

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-08 Thread Alex Williamson
On Thu, 8 Aug 2019 09:12:53 -0500 Parav Pandit wrote: > Currently mtty sample driver uses mdev state and UUID in convoluated way to > generate an interrupt. > It uses several translations from mdev_state to mdev_device to mdev uuid. > After which it does linear search of long uuid comparision

Re: [RFC PATCH v4 2/6] vfio: Introduce vGPU display irq type

2019-08-02 Thread Alex Williamson
On Fri, 2 Aug 2019 15:35:31 +0200 "kra...@redhat.com" wrote: > Hi, > > > > > Couldn't you expose this as another capability within the IRQ_INFO > > > > return > > > > data? If you were to define it as a macro, I assume that means it > > > > would be > > > > hard coded, in which case this

Re: [PATCH] vfio: re-arrange vfio region definitions

2019-07-31 Thread Alex Williamson
On Wed, 31 Jul 2019 20:47:07 +0200 Auger Eric wrote: > Hi Connie, > > On 7/17/19 1:49 PM, Cornelia Huck wrote: > > It is easy to miss already defined region types. Let's re-arrange > > the definitions a bit and add more comments to make it hopefully > > a bit clearer. > > > > No functional

Re: [RFC PATCH v4 2/6] vfio: Introduce vGPU display irq type

2019-07-22 Thread Alex Williamson
On Tue, 23 Jul 2019 01:08:19 + "Zhang, Tina" wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, July 23, 2019 3:41 AM > > To: Lu, Kechen > > Cc: intel-gvt-...@lists.freedesktop.o

Re: [RFC PATCH v4 2/6] vfio: Introduce vGPU display irq type

2019-07-22 Thread Alex Williamson
On Mon, 22 Jul 2019 05:28:35 + "Lu, Kechen" wrote: > Hi, > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Saturday, July 20, 2019 12:25 AM > > To: Lu, Kechen > > Cc: intel-gvt-...@list

Re: [PATCH v1 9/9] smaples: add vfio-mdev-pci driver

2019-07-19 Thread Alex Williamson
On Fri, 12 Jul 2019 12:55:27 + "Liu, Yi L" wrote: > Hi Alex, > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, July 12, 2019 3:08 AM > > To: Liu, Yi L > > Subject: Re: [PATCH v1 9/9] smaples: add vfio-mdev-pci driv

Re: [RFC PATCH v4 2/6] vfio: Introduce vGPU display irq type

2019-07-19 Thread Alex Williamson
On Thu, 18 Jul 2019 23:56:36 +0800 Kechen Lu wrote: > From: Tina Zhang > > Introduce vGPU specific irq type VFIO_IRQ_TYPE_GFX, and > VFIO_IRQ_SUBTYPE_GFX_DISPLAY_IRQ as the subtype for vGPU display > > Signed-off-by: Tina Zhang > --- > include/uapi/linux/vfio.h | 3 +++ > 1 file changed, 3

[GIT PULL] VFIO updates for v5.3-rc1

2019-07-16 Thread Alex Williamson
unused code in mbochs sample (YueHaibing) - Send uevents around mdev registration (Alex Williamson) Alex Williamson (1): mdev: Send uevents around parent device registration Kefeng Wang (1): vfio-mdev/samples: make some

Re: [PATCH v1 9/9] smaples: add vfio-mdev-pci driver

2019-07-11 Thread Alex Williamson
On Thu, 11 Jul 2019 12:27:26 + "Liu, Yi L" wrote: > Hi Alex, > > > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > > Of Alex Williamson > > Sent: Friday, July 5, 2019 11:55 PM > > To: Liu, Yi L > > Subject: Re: [P

[PATCH v3] mdev: Send uevents around parent device registration

2019-07-10 Thread Alex Williamson
This allows udev to trigger rules when a parent device is registered or unregistered from mdev. Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson --- v3: Add Connie's R-b Add comment clarifying expected device requirements for unreg drivers/vfio/mdev/mdev_core.c |9

Re: [PATCH v1 9/9] smaples: add vfio-mdev-pci driver

2019-07-05 Thread Alex Williamson
On Thu, 4 Jul 2019 09:11:02 + "Liu, Yi L" wrote: > Hi Alex, > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, July 4, 2019 1:22 AM > > To: Liu, Yi L > > Subject: Re: [PATCH v1 9/9] smaples: add vfio-mdev-pci dri

Re: [RFC v2] vhost: introduce mdev based hardware vhost backend

2019-07-05 Thread Alex Williamson
On Thu, 4 Jul 2019 14:21:34 +0800 Tiwei Bie wrote: > On Thu, Jul 04, 2019 at 12:31:48PM +0800, Jason Wang wrote: > > On 2019/7/3 下午9:08, Tiwei Bie wrote: > > > On Wed, Jul 03, 2019 at 08:16:23PM +0800, Jason Wang wrote: > > > > On 2019/7/3 下午7:52, Tiwei Bie wrote: > > > > > On Wed, Jul 03,

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

2019-07-03 Thread Alex Williamson
On Wed, 26 Jun 2019 16:12:44 +0100 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. > > Reserved regions with type

Re: [RFC v2] vhost: introduce mdev based hardware vhost backend

2019-07-03 Thread Alex Williamson
On Wed, 3 Jul 2019 17:13:39 +0800 Tiwei Bie wrote: > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h > index 8f10748dac79..6c5718ab7eeb 100644 > --- a/include/uapi/linux/vfio.h > +++ b/include/uapi/linux/vfio.h > @@ -201,6 +201,7 @@ struct vfio_device_info { > #define

Re: [PATCH v1 9/9] smaples: add vfio-mdev-pci driver

2019-07-03 Thread Alex Williamson
On Wed, 3 Jul 2019 08:25:25 + "Liu, Yi L" wrote: > Hi Alex, > > Thanks for the comments. Have four inline responses below. And one > of them need your further help. :-) > . > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, J

Re: [PATCH v2] mdev: Send uevents around parent device registration

2019-07-02 Thread Alex Williamson
On Tue, 2 Jul 2019 23:34:30 +0530 Kirti Wankhede wrote: > On 7/2/2019 8:13 PM, Alex Williamson wrote: > > On Tue, 2 Jul 2019 19:10:17 +0530 > > Kirti Wankhede wrote: > > > >> On 7/2/2019 6:38 PM, Alex Williamson wrote: > >>> On Tue, 2 Jul 2019

Re: [PATCH -next] sample/mdev/mbochs: remove set but not used variable 'mdev_state'

2019-07-02 Thread Alex Williamson
On Sat, 25 May 2019 21:53:49 +0800 YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > samples/vfio-mdev/mbochs.c: In function mbochs_ioctl: > samples/vfio-mdev/mbochs.c:1188:21: warning: variable mdev_state set but not > used [-Wunused-but-set-variable] > > It's not used

<    1   2   3   4   5   6   7   8   9   10   >