Re: [PATCH v2 02/14] vfio/mbochs: Fix missing error unwind in mbochs_probe()

2021-07-20 Thread Alex Williamson
On Tue, 20 Jul 2021 14:42:48 -0300 Jason Gunthorpe wrote: > Compared to mbochs_remove() two cases are missing from the > vfio_register_group_dev() unwind. Add them in. > > Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()") > Reported-by: Cornelia Huck > Signed-off-by:

Re: [PATCH v2 02/14] vfio/mbochs: Fix missing error unwind in mbochs_probe()

2021-07-20 Thread Alex Williamson
On Tue, 20 Jul 2021 19:49:55 -0300 Jason Gunthorpe wrote: > On Tue, Jul 20, 2021 at 04:01:27PM -0600, Alex Williamson wrote: > > On Tue, 20 Jul 2021 14:42:48 -0300 > > Jason Gunthorpe wrote: > > > > > Compared to mbochs_remove() two cases are missing from the

Re: [PATCH v3 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-08-03 Thread Alex Williamson
On Wed, 28 Jul 2021 21:49:18 -0300 Jason Gunthorpe wrote: > Keep track of all the vfio_devices that have been added to the device set > and use this list in vfio_pci_try_bus_reset() instead of trying to work > backwards from the pci_device. > > The dev_set->lock directly prevents devices from jo

Re: [PATCH v3 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-08-03 Thread Alex Williamson
On Tue, 3 Aug 2021 13:41:52 -0300 Jason Gunthorpe wrote: > On Tue, Aug 03, 2021 at 10:34:06AM -0600, Alex Williamson wrote: > > I think the vfio_pci_find_reset_target() function needs to be re-worked > > to just tell us true/false that it's ok to reset the provided device,

Re: [PATCH 1/2] vfio/pci: remove vfio_pci_nvlink2

2021-04-06 Thread Alex Williamson
On Fri, 26 Mar 2021 07:13:10 +0100 Christoph Hellwig wrote: > This driver never had any open userspace (which for VFIO would include > VM kernel drivers) that use it, and thus should never have been added > by our normal userspace ABI rules. > > Signed-off-by: Christoph Hellwig > Acked-by: Greg

Re: [PATCH 1/2] vfio/pci: remove vfio_pci_nvlink2

2021-04-12 Thread Alex Williamson
On Mon, 12 Apr 2021 19:41:41 +1000 Michael Ellerman wrote: > Alex Williamson writes: > > On Fri, 26 Mar 2021 07:13:10 +0100 > > Christoph Hellwig wrote: > > > >> This driver never had any open userspace (which for VFIO would include > >> VM kernel driv

Re: [PATCH v2 00/18] Make vfio_mdev type safe

2021-04-14 Thread Alex Williamson
On Tue, 6 Apr 2021 16:40:23 -0300 Jason Gunthorpe wrote: > vfio_mdev has a number of different objects: mdev_parent, mdev_type and > mdev_device. > > Unfortunately the types of these have been erased in various places > throughout the API, and this makes it very hard to understand this code or

Re: linux-next: manual merge of the vfio tree with the drm tree

2021-04-15 Thread Alex Williamson
On Thu, 15 Apr 2021 10:08:55 -0300 Jason Gunthorpe wrote: > On Thu, Apr 15, 2021 at 04:47:34PM +1000, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the vfio tree got a conflict in: > > > > drivers/gpu/drm/i915/gvt/gvt.c > > > > between commit: > > > > 9ff06c38530

Re: [PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV

2021-04-23 Thread Alex Williamson
On Fri, 23 Apr 2021 09:07:09 -0300 Jason Gunthorpe wrote: > On Fri, Apr 23, 2021 at 11:54:26AM +0800, Zhenyu Wang wrote: > > On 2021.04.22 10:58:10 -0300, Jason Gunthorpe wrote: > > > On Thu, Apr 22, 2021 at 03:35:33PM +0200, Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > > > > >

Re: [PATCH v2 00/13] Remove vfio_mdev.c, mdev_parent_ops and more

2021-04-27 Thread Alex Williamson
On Mon, 26 Apr 2021 17:00:02 -0300 Jason Gunthorpe wrote: > The mdev bus's core part for managing the lifecycle of devices is mostly > as one would expect for a driver core bus subsystem. > > However instead of having a normal 'struct device_driver' and binding the > actual mdev drivers through

Re: [PATCH v2 00/13] Remove vfio_mdev.c, mdev_parent_ops and more

2021-04-27 Thread Alex Williamson
On Tue, 27 Apr 2021 19:20:26 -0300 Jason Gunthorpe wrote: > On Tue, Apr 27, 2021 at 03:30:42PM -0600, Alex Williamson wrote: > > > It'd be really helpful if you could consistently copy at least one > > list, preferably one monitored by patchwork, for an entire serie

Re: [PATCH v3 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-08-05 Thread Alex Williamson
On Thu, 5 Aug 2021 08:47:01 -0300 Jason Gunthorpe wrote: > On Tue, Aug 03, 2021 at 10:52:25AM -0600, Alex Williamson wrote: > > On Tue, 3 Aug 2021 13:41:52 -0300 > > Jason Gunthorpe wrote: > > > On Tue, Aug 03, 2021 at 10:34:06AM -0600, Alex Williamson wrot

Re: [PATCH v4 00/14] Provide core infrastructure for managing open/release

2021-08-11 Thread Alex Williamson
On Thu, 5 Aug 2021 22:18:56 -0300 Jason Gunthorpe wrote: > This is in support of Max's series to split vfio-pci. For that to work the > reflck concept embedded in vfio-pci needs to be sharable across all of the > new VFIO PCI drivers which motivated re-examining how this is > implemented. > > A

Re: [PATCH 1/2] vfio/pci: remove vfio_pci_nvlink2

2021-03-22 Thread Alex Williamson
On Mon, 22 Mar 2021 16:01:54 +0100 Christoph Hellwig wrote: > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h > index 8ce36c1d53ca11..db7e782419d5d9 100644 > --- a/include/uapi/linux/vfio.h > +++ b/include/uapi/linux/vfio.h > @@ -332,19 +332,6 @@ struct vfio_region_info_cap_type

Re: remove the nvlink2 pci_vfio subdriver v2

2021-05-04 Thread Alex Williamson
On Tue, 4 May 2021 16:11:31 +0200 Greg Kurz wrote: > On Tue, 4 May 2021 15:30:15 +0200 > Greg Kroah-Hartman wrote: > > > On Tue, May 04, 2021 at 03:20:34PM +0200, Greg Kurz wrote: > > > On Tue, 4 May 2021 14:59:07 +0200 > > > Greg Kroah-Hartman wrote: > > > > > > > On Tue, May 04, 2021 at

Re: [PATCH 09/13] vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set

2021-07-15 Thread Alex Williamson
On Wed, 14 Jul 2021 21:20:38 -0300 Jason Gunthorpe wrote: > +/* > + * We need to get memory_lock for each device, but devices can share > mmap_lock, > + * therefore we need to zap and hold the vma_lock for each device, and only > then > + * get each memory_lock. > + */ > +static int vfio_hot_res

Re: [PATCH 09/13] vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set

2021-07-15 Thread Alex Williamson
On Thu, 15 Jul 2021 19:11:49 -0300 Jason Gunthorpe wrote: > On Thu, Jul 15, 2021 at 03:00:55PM -0600, Alex Williamson wrote: > > On Wed, 14 Jul 2021 21:20:38 -0300 > > Jason Gunthorpe wrote: > > > +/* > > > + * We need to get memory_lock for each device, but d

Re: [PATCH v2 5/9] vfio/mdev: Consolidate all the device_api sysfs into the core code

2021-09-10 Thread Alex Williamson
On Fri, 10 Sep 2021 10:38:50 -0300 Jason Gunthorpe wrote: > On Fri, Sep 10, 2021 at 01:10:46PM +0100, Christoph Hellwig wrote: > > On Thu, Sep 09, 2021 at 04:38:45PM -0300, Jason Gunthorpe wrote: > > > Every driver just emits a static string, simply feed it through the ops > > > and provide a s

Re: Couple of issues with amdgpu on my WX4100

2021-01-04 Thread Alex Williamson
On Mon, 4 Jan 2021 12:34:34 +0100 Christian König wrote: > Hi Maxim, > > I can't help with the display related stuff. Probably best approach to > get this fixes would be to open up a bug tracker for this on FDO. > > But I'm the one who implemented the resizeable BAR support and your > analysi

Re: Couple of issues with amdgpu on my WX4100

2021-01-04 Thread Alex Williamson
On Mon, 4 Jan 2021 18:39:33 +0100 Christian König wrote: > Am 04.01.21 um 17:45 schrieb Alex Williamson: > > On Mon, 4 Jan 2021 12:34:34 +0100 > > Christian König wrote: > > > >> Hi Maxim, > >> > >> I can't help with the display related

Re: Couple of issues with amdgpu on my WX4100

2021-01-04 Thread Alex Williamson
On Mon, 4 Jan 2021 21:13:53 +0100 Christian König wrote: > Am 04.01.21 um 19:43 schrieb Alex Williamson: > > On Mon, 4 Jan 2021 18:39:33 +0100 > > Christian König wrote: > > > >> Am 04.01.21 um 17:45 schrieb Alex Williamson: > >>> On Mon, 4 Jan

[PATCH 1/2] drm/aperture: Split conflicting platform driver removal

2022-06-06 Thread Alex Williamson
features. Reported-by: Laszlo Ersek Tested-by: Laszlo Ersek Suggested-by: Gerd Hoffmann Signed-off-by: Alex Williamson --- drivers/gpu/drm/drm_aperture.c | 33 - include/drm/drm_aperture.h |2 ++ 2 files changed, 26 insertions(+), 9 deletions(-) diff

[PATCH 0/2] Improve vfio-pci primary GPU assignment behavior

2022-06-06 Thread Alex Williamson
split out and export the necessary DRM apterture support and mirror the framebuffer and VGA support. I'd be happy to pull this series in through the vfio branch if approved by the DRM maintainers. Thanks, Alex --- Alex Williamson (2): drm/aperture: Split conflicting platform driver re

[PATCH 2/2] vfio/pci: Remove console drivers

2022-06-06 Thread Alex Williamson
initialization. Reported-by: Laszlo Ersek Tested-by: Laszlo Ersek Suggested-by: Gerd Hoffmann Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_core.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c

Re: [PATCH 0/2] Improve vfio-pci primary GPU assignment behavior

2022-06-07 Thread Alex Williamson
On Tue, 7 Jun 2022 19:40:40 +0200 Javier Martinez Canillas wrote: > Hello Alex, > > On 6/6/22 19:53, Alex Williamson wrote: > > Users attempting to enable vfio PCI device assignment with a GPU will > > often block the default PCI driver from the device to avoid conflict

Re: [PATCH 2/2] vfio/pci: Remove console drivers

2022-06-08 Thread Alex Williamson
Hi Thomas, On Wed, 8 Jun 2022 13:11:21 +0200 Thomas Zimmermann wrote: > Hi Alex > > Am 06.06.22 um 19:53 schrieb Alex Williamson: > > Console drivers can create conflicts with PCI resources resulting in > > userspace getting mmap failures to memory BARs. This is especi

Re: [PATCH 2/2] vfio/pci: Remove console drivers

2022-06-09 Thread Alex Williamson
On Thu, 9 Jun 2022 11:13:22 +0200 Thomas Zimmermann wrote: > > Please have a look at the attached patch. It moves the aperture helpers > to a location common to the various possible users (DRM, fbdev, vfio). > The DRM interfaces remain untouched for now. The patch should provide > what you ne

Re: [PATCH 2/2] vfio/pci: Remove console drivers

2022-06-09 Thread Alex Williamson
On Thu, 9 Jun 2022 15:41:02 -0600 Alex Williamson wrote: > On Thu, 9 Jun 2022 11:13:22 +0200 > Thomas Zimmermann wrote: > > > > Please have a look at the attached patch. It moves the aperture helpers > > to a location common to the various possible users (DRM, fb

Re: [PATCH 2/2] vfio/pci: Remove console drivers

2022-06-10 Thread Alex Williamson
On Fri, 10 Jun 2022 09:03:15 +0200 Thomas Zimmermann wrote: > Hi > > Am 09.06.22 um 23:44 schrieb Alex Williamson: > > On Thu, 9 Jun 2022 15:41:02 -0600 > > Alex Williamson wrote: > > > >> On Thu, 9 Jun 2022 11:13:22 +0200 > >> Thomas Zimmerman

[PATCH v2 0/2] Improve vfio-pci primary GPU assignment behavior

2022-06-16 Thread Alex Williamson
el.org/all/165453797543.3592816.6381793341352595461.stgit@omen/ --- Alex Williamson (1): vfio/pci: Remove console drivers Thomas Zimmermann (1): drm: Implement DRM aperture helpers under video/ Documentation/driver-api/aperture.rst | 13 + Documentation/driver-api/index.rst| 1 + drivers/gpu/drm/drm_aperture.c

[PATCH v2 1/2] drm: Implement DRM aperture helpers under video/

2022-06-16 Thread Alex Williamson
re drivers within DRM and fbdev, and the VGA text-console driver. The original DRM interface is kept in place for use by DRM drivers. Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Williamson --- Documentation/driver-api/aperture.rst | 13 + Documentation/driver-api/index.rst|1

[PATCH v2 2/2] vfio/pci: Remove console drivers

2022-06-16 Thread Alex Williamson
Suggested-by: Gerd Hoffmann Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_core.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c index a0d69ddaf90d..5b2a6e9f7cf7 100644 --- a/drivers/vfio/pci

Re: [PATCH] drm/aperture: Run fbdev removal before internal helpers

2022-06-17 Thread Alex Williamson
On Fri, 17 Jun 2022 14:41:01 +0200 Thomas Zimmermann wrote: > Hi > > Am 17.06.22 um 14:29 schrieb Javier Martinez Canillas: > > [adding Zack and Alex to Cc list] > > > > Hello Thomas, > > > > Thanks a lot for tracking this down and figuring out the root cause! > > > > On 6/17/22 14:10, Thomas

Re: [PATCH v2 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-17 Thread Alex Williamson
On Tue, 7 Jun 2022 20:02:11 -0300 Jason Gunthorpe wrote: > diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c > index 61e71c1154be67..f005b644ab9e69 100644 > --- a/drivers/vfio/vfio.c > +++ b/drivers/vfio/vfio.c > @@ -1077,8 +1077,20 @@ static void vfio_device_unassign_container(struct > vfi

Re: [PATCH v2 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-17 Thread Alex Williamson
On Fri, 17 Jun 2022 16:42:30 -0600 Alex Williamson wrote: > On Tue, 7 Jun 2022 20:02:11 -0300 > Jason Gunthorpe wrote: > > diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c > > index 61e71c1154be67..f005b644ab9e69 100644 > > --- a/drivers/vfio/vfio.c >

Re: [PATCH v2 2/2] vfio: Replace the iommu notifier with a device list

2022-06-17 Thread Alex Williamson
On Tue, 7 Jun 2022 20:02:12 -0300 Jason Gunthorpe wrote: > Instead of bouncing the function call to the driver op through a blocking > notifier just have the iommu layer call it directly. > > Register each device that is being attached to the iommu with the lower > driver which then threads the

Re: [PATCH] drm/aperture: Run fbdev removal before internal helpers

2022-06-21 Thread Alex Williamson
On Tue, 21 Jun 2022 13:01:08 +0200 Thomas Zimmermann wrote: > Hi > > Am 17.06.22 um 16:12 schrieb Alex Williamson: > > On Fri, 17 Jun 2022 14:41:01 +0200 > > Thomas Zimmermann wrote: > > > >> Hi > >> > >> Am 17.06.22 um 14:29 schrieb J

Re: [PULL v2] gvt-next

2022-04-20 Thread Alex Williamson
On Wed, 20 Apr 2022 13:43:51 -0300 Jason Gunthorpe wrote: > On Wed, Apr 20, 2022 at 04:34:47PM +, Wang, Zhi A wrote: > > Hi folks: > > > > Here is the PR of gvt-next. Thanks so much for the patience. > > > > Mostly it includes the patch bundle of GVT-g re-factor patches for adapting > > th

Re: [PULL] gvt-next

2022-04-28 Thread Alex Williamson
On Tue, 26 Apr 2022 08:52:58 -0300 Jason Gunthorpe wrote: > On Tue, Apr 26, 2022 at 08:42:25AM +, Wang, Zhi A wrote: > > On 4/26/22 8:37 AM, Jani Nikula wrote: > > > On Tue, 26 Apr 2022, "Wang, Zhi A" wrote: > > >> Hi folks: > > >> > > >> Here is the pull of gvt-next which fixs the compi

Re: [PULL] gvt-next

2022-04-28 Thread Alex Williamson
On Thu, 28 Apr 2022 15:35:58 -0600 Alex Williamson wrote: > On Tue, 26 Apr 2022 08:52:58 -0300 > Jason Gunthorpe wrote: > > > On Tue, Apr 26, 2022 at 08:42:25AM +, Wang, Zhi A wrote: > > > On 4/26/22 8:37 AM, Jani Nikula wrote: > > > > On Tu

Re: [PATCH v2 7/7] vfio: Remove calls to vfio_group_add_container_user()

2022-04-29 Thread Alex Williamson
On Thu, 21 Apr 2022 13:28:38 -0300 Jason Gunthorpe wrote: > When the open_device() op is called the container_users is incremented and > held incremented until close_device(). Thus, so long as drivers call > functions within their open_device()/close_device() region they do not > need to worry ab

Re: [PATCH v2 0/7] Make the rest of the VFIO driver interface use vfio_device

2022-04-29 Thread Alex Williamson
On Fri, 29 Apr 2022 14:31:49 -0300 Jason Gunthorpe wrote: > On Thu, Apr 21, 2022 at 01:28:31PM -0300, Jason Gunthorpe wrote: > > Prior series have transformed other parts of VFIO from working on struct > > device or struct vfio_group into working directly on struct > > vfio_device. Based on that

Re: [PATCH v9 1/3] i915/gvt: Separate the MMIO tracking table from GVT-g

2022-08-08 Thread Alex Williamson
On Thu, 7 Apr 2022 03:19:43 -0400 Zhi Wang wrote: > From: Zhi Wang > > To support the new mdev interfaces and the re-factor patches from > Christoph, which moves the GVT-g code into a dedicated module, the GVT-g > MMIO tracking table needs to be separated from GVT-g. > Since this commit I'm

Re: [PATCH 0/4] Allow MMIO regions to be exported through dma-buf

2022-08-22 Thread Alex Williamson
On Thu, 18 Aug 2022 09:05:24 -0300 Jason Gunthorpe wrote: > On Wed, Aug 17, 2022 at 01:11:38PM -0300, Jason Gunthorpe wrote: > > dma-buf has become a way to safely acquire a handle to non-struct page > > memory that can still have lifetime controlled by the exporter. Notably > > RDMA can now impo

Re: [PATCH v4 0/7] Make the rest of the VFIO driver interface use vfio_device

2022-05-12 Thread Alex Williamson
On Thu, 5 May 2022 21:08:38 -0300 Jason Gunthorpe wrote: > Prior series have transformed other parts of VFIO from working on struct > device or struct vfio_group into working directly on struct > vfio_device. Based on that work we now have vfio_device's readily > available in all the drivers. >

Re: [PATCH v3 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-07-07 Thread Alex Williamson
On Mon, 4 Jul 2022 21:59:03 -0300 Jason Gunthorpe wrote: > diff --git a/drivers/s390/cio/vfio_ccw_ops.c b/drivers/s390/cio/vfio_ccw_ops.c > index b49e2e9db2dc6f..09e0ce7b72324c 100644 > --- a/drivers/s390/cio/vfio_ccw_ops.c > +++ b/drivers/s390/cio/vfio_ccw_ops.c > @@ -44,31 +44,19 @@ static int

Re: [PATCH 15/15] vfio: Add struct device to vfio_device

2022-08-30 Thread Alex Williamson
On Sun, 28 Aug 2022 01:10:37 +0800 Kevin Tian wrote: > From: Yi Liu > > and replace kref. With it a 'vfio-dev/vfioX' node is created under the > sysfs path of the parent, indicating the device is bound to a vfio > driver, e.g.: > > /sys/devices/pci\:6f/\:6f\:01.0/vfio-dev/vfio0 > > It

Re: [PATCH 15/15] vfio: Add struct device to vfio_device

2022-08-31 Thread Alex Williamson
On Wed, 31 Aug 2022 06:10:51 + "Tian, Kevin" wrote: > > From: Jason Gunthorpe > > Sent: Wednesday, August 31, 2022 7:53 AM > > > > On Tue, Aug 30, 2022 at 04:18:38PM -0600, Alex Williamson wrote: > > > On Sun, 28 Aug 2022 01:10:37 +0800 > &

Re: [PATCH 15/15] vfio: Add struct device to vfio_device

2022-08-31 Thread Alex Williamson
On Thu, 1 Sep 2022 00:46:51 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Thursday, September 1, 2022 1:15 AM > > > > On Wed, 31 Aug 2022 06:10:51 + > > "Tian, Kevin" wrote: > > > > > > Fro

Re: [PATCH v3 06/15] vfio/mtty: Use the new device life cycle helpers

2022-09-20 Thread Alex Williamson
On Fri, 9 Sep 2022 18:22:38 +0800 Kevin Tian wrote: > From: Yi Liu > > and manage available ports inside @init/@release. > > Signed-off-by: Yi Liu > Signed-off-by: Kevin Tian > Reviewed-by: Jason Gunthorpe > --- > samples/vfio-mdev/mtty.c | 67 +++- > 1

Re: [PATCH v3 15/15] vfio: Add struct device to vfio_device

2022-09-20 Thread Alex Williamson
On Fri, 9 Sep 2022 18:22:47 +0800 Kevin Tian wrote: > From: Yi Liu > > and replace kref. With it a 'vfio-dev/vfioX' node is created under the > sysfs path of the parent, indicating the device is bound to a vfio > driver, e.g.: > > /sys/devices/pci\:6f/\:6f\:01.0/vfio-dev/vfio0 > > It

Re: [PATCH v4 00/15] Tidy up vfio_device life cycle

2022-09-22 Thread Alex Williamson
On Wed, 21 Sep 2022 18:43:46 +0800 Kevin Tian wrote: > The idea is to let vfio core manage the vfio_device life cycle instead > of duplicating the logic cross drivers. Besides cleaner code in driver > side this also allows adding struct device to vfio_device as the first > step toward adding cdev

Re: [PATCH v4 15/15] vfio: Add struct device to vfio_device

2022-09-29 Thread Alex Williamson
Hi Kevin, This introduced the regression discovered here: https://lore.kernel.org/all/20220928125650.0a2ea297.alex.william...@redhat.com/ Seems we're not releasing the resources when removing an mdev. This is a regression, so it needs to be fixed or reverted before the merge window. Thanks, A

Re: [PATCH v4 15/15] vfio: Add struct device to vfio_device

2022-09-29 Thread Alex Williamson
On Thu, 29 Sep 2022 14:49:56 -0300 Jason Gunthorpe wrote: > On Thu, Sep 29, 2022 at 10:55:19AM -0600, Alex Williamson wrote: > > Hi Kevin, > > > > This introduced the regression discovered here: > > > > https://lore.kernel.org/all/20220928125650.0a

Re: [PATCH] drm/i915/gvt: Add missing vfio_unregister_group_dev() call

2022-09-30 Thread Alex Williamson
add it. > > Cc: sta...@vger.kernel.org > Fixes: 978cf586ac35 ("drm/i915/gvt: convert to use > vfio_register_emulated_iommu_dev") > Reported-by: Alex Williamson > Signed-off-by: Jason Gunthorpe > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 1 + > 1 file change

Re: [PATCH v4 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-07-20 Thread Alex Williamson
On Tue, 19 Jul 2022 21:02:48 -0300 Jason Gunthorpe wrote: > diff --git a/drivers/s390/crypto/vfio_ap_ops.c > b/drivers/s390/crypto/vfio_ap_ops.c > index a7d2a95796d360..bb1a1677c5c230 100644 > --- a/drivers/s390/crypto/vfio_ap_ops.c > +++ b/drivers/s390/crypto/vfio_ap_ops.c > @@ -1226,34 +1226,14

Re: [PATCH v4 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-07-20 Thread Alex Williamson
On Wed, 20 Jul 2022 17:08:29 -0300 Jason Gunthorpe wrote: > On Wed, Jul 20, 2022 at 01:41:13PM -0600, Alex Williamson wrote: > > > ie. we don't need the gfn, we only need the iova. > > Right, that makes sense > > > However then I start to wonder why we&#

Re: [PATCH v4 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-07-21 Thread Alex Williamson
On Thu, 21 Jul 2022 12:01:47 -0400 Eric Farman wrote: > On Wed, 2022-07-20 at 17:04 -0600, Alex Williamson wrote: > > On Wed, 20 Jul 2022 17:08:29 -0300 > > Jason Gunthorpe wrote: > > > > > On Wed, Jul 20, 2022 at 01:41:13PM -0600, Alex Williamson wrote: >

Re: [PATCH v3 00/10] Update vfio_pin/unpin_pages API

2022-07-22 Thread Alex Williamson
On Fri, 8 Jul 2022 15:44:18 -0700 Nicolin Chen wrote: > This is a preparatory series for IOMMUFD v2 patches. It prepares for > replacing vfio_iommu_type1 implementations of vfio_pin/unpin_pages() > with IOMMUFD version. > > There's a gap between these two versions: the vfio_iommu_type1 version >

Re: [PATCH v4 0/2] Remove the VFIO_IOMMU_NOTIFY_DMA_UNMAP notifier

2022-07-22 Thread Alex Williamson
On Tue, 19 Jul 2022 21:02:47 -0300 Jason Gunthorpe wrote: > This is the last notifier toward the drivers, replace it with a simple op > callback in the vfio_device_ops. > > v4: > - Rebase over the CCW series > v3: > https://lore.kernel.org/r/0-v3-7593f297c43f+56ce-vfio_unmap_notif_...@nvidia.c

Re: [PATCH v3 00/10] Update vfio_pin/unpin_pages API

2022-07-22 Thread Alex Williamson
On Fri, 22 Jul 2022 16:12:19 -0700 Nicolin Chen wrote: > On Fri, Jul 22, 2022 at 04:11:29PM -0600, Alex Williamson wrote: > > > GVT-g explodes for me with this series on my Broadwell test system, > > continuously spewing the following: > > Thank you for

Re: [PATCH v3 00/10] Update vfio_pin/unpin_pages API

2022-07-22 Thread Alex Williamson
On Fri, 22 Jul 2022 17:38:25 -0700 Nicolin Chen wrote: > On Fri, Jul 22, 2022 at 06:18:00PM -0600, Alex Williamson wrote: > > External email: Use caution opening links or attachments > > > > > > On Fri, 22 Jul 2022 16:12:19 -0700 > > Nicolin Chen wrote: > &

Re: [PATCH v4 00/10] cover-letter: Update vfio_pin/unpin_pages API

2022-07-25 Thread Alex Williamson
On Fri, 22 Jul 2022 19:02:46 -0700 Nicolin Chen wrote: > This is a preparatory series for IOMMUFD v2 patches. It prepares for > replacing vfio_iommu_type1 implementations of vfio_pin/unpin_pages() > with IOMMUFD version. > > There's a gap between these two versions: the vfio_iommu_type1 version

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Alex Williamson
On Mon, 4 Nov 2019 20:39:50 +0800 Jason Wang wrote: > This patch implements basic support for mdev driver that supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/mdev_core.c| 20 > drivers/vfio/mdev/mdev_private.h | 2 + >

Re: [PATCH V7 1/6] mdev: class id support

2019-11-04 Thread Alex Williamson
On Mon, 4 Nov 2019 20:39:47 +0800 Jason Wang wrote: > Mdev bus only supports vfio driver right now, so it doesn't implement > match method. But in the future, we may add drivers other than vfio, > the first driver could be virtio-mdev. This means we need to add > device class id support in bus m

Re: [PATCH V7 3/6] mdev: introduce device specific ops

2019-11-04 Thread Alex Williamson
On Mon, 4 Nov 2019 20:39:49 +0800 Jason Wang wrote: > Currently, except for the create and remove, the rest of > mdev_parent_ops is designed for vfio-mdev driver only and may not help > for kernel mdev driver. With the help of class id, this patch > introduces device specific callbacks inside md

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Alex Williamson
On Tue, 5 Nov 2019 11:52:41 +0800 Jason Wang wrote: > On 2019/11/5 上午5:50, Alex Williamson wrote: > > On Mon, 4 Nov 2019 20:39:50 +0800 > > Jason Wang wrote: > > > >> This patch implements basic support for mdev driver that supports > >> vi

Re: [PATCH V8 3/6] mdev: introduce device specific ops

2019-11-05 Thread Alex Williamson
On Tue, 5 Nov 2019 17:50:25 +0100 Cornelia Huck wrote: > On Tue, 5 Nov 2019 17:32:37 +0800 > Jason Wang wrote: > > > Currently, except for the create and remove, the rest of > > mdev_parent_ops is designed for vfio-mdev driver only and may not help > > for kernel mdev driver. With the help of

Re: [PATCH V8 4/6] mdev: introduce virtio device and its device ops

2019-11-05 Thread Alex Williamson
On Tue, 5 Nov 2019 17:32:38 +0800 Jason Wang wrote: > This patch implements basic support for mdev driver that supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/mdev_core.c| 21 + > drivers/vfio/mdev/mdev_private.h | 2 + >

Re: [PATCH V8 0/6] mdev based hardware virtio offloading support

2019-11-05 Thread Alex Williamson
On Tue, 5 Nov 2019 17:32:34 +0800 Jason Wang wrote: > Hi all: > > There are hardwares that can do virtio datapath offloading while > having its own control path. This path tries to implement a mdev based > unified API to support using kernel virtio driver to drive those > devices. This is done

Re: [PATCH V8 0/6] mdev based hardware virtio offloading support

2019-11-06 Thread Alex Williamson
On Wed, 6 Nov 2019 11:56:46 +0800 Jason Wang wrote: > On 2019/11/6 上午1:58, Alex Williamson wrote: > > On Tue, 5 Nov 2019 17:32:34 +0800 > > Jason Wang wrote: > > > >> Hi all: > >> > >> There are hardwares that can do virtio datapath offload

Re: [PATCH V8 0/6] mdev based hardware virtio offloading support

2019-11-06 Thread Alex Williamson
On Wed, 6 Nov 2019 14:25:23 -0500 "Michael S. Tsirkin" wrote: > On Wed, Nov 06, 2019 at 12:03:12PM -0700, Alex Williamson wrote: > > On Wed, 6 Nov 2019 11:56:46 +0800 > > Jason Wang wrote: > > > > > On 2019/11/6 上午1:58, Alex Williamson wrote: &g

Re: [PATCH V9 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-06 Thread Alex Williamson
On Wed, 6 Nov 2019 14:50:30 -0800 Randy Dunlap wrote: > On 11/5/19 11:05 PM, Jason Wang wrote: > > diff --git a/samples/Kconfig b/samples/Kconfig > > index c8dacb4dda80..13a2443e18e0 100644 > > --- a/samples/Kconfig > > +++ b/samples/Kconfig > > @@ -131,6 +131,16 @@ config SAMPLE_VFIO_MDEV_MDPY >

Re: [PATCH V3 1/7] mdev: class id support

2019-10-15 Thread Alex Williamson
On Fri, 11 Oct 2019 16:15:51 +0800 Jason Wang wrote: > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index b558d4cfd082..724e9b9841d8 100644 > --- a/drivers/vfio/mdev/mdev_core.c > +++ b/drivers/vfio/mdev/mdev_core.c > @@ -45,6 +45,12 @@ void mdev_set_drvdata(stru

Re: [PATCH V3 4/7] mdev: introduce device specific ops

2019-10-15 Thread Alex Williamson
On Tue, 15 Oct 2019 20:17:01 +0800 Jason Wang wrote: > On 2019/10/15 下午6:41, Cornelia Huck wrote: > > On Fri, 11 Oct 2019 16:15:54 +0800 > > Jason Wang wrote: > > > >> Currently, except for the create and remove, the rest of > >> mdev_parent_ops is designed for vfio-mdev driver only and may no

Re: [PATCH V3 4/7] mdev: introduce device specific ops

2019-10-16 Thread Alex Williamson
On Wed, 16 Oct 2019 15:31:25 + Parav Pandit wrote: > > -Original Message- > > From: Cornelia Huck > > Sent: Wednesday, October 16, 2019 3:53 AM > > To: Parav Pandit > > Cc: Alex Williamson ; Jason Wang > > ; k...@vger.kernel.org; linux

Re: [PATCH V3 4/7] mdev: introduce device specific ops

2019-10-16 Thread Alex Williamson
On Wed, 16 Oct 2019 20:48:06 + Parav Pandit wrote: > > From: Alex Williamson > > On Wed, 16 Oct 2019 15:31:25 + > > Parav Pandit wrote: > > > > From: Cornelia Huck > > > > Parav Pandit wrote: > > > > > > From: Alex Williamso

Re: [PATCH V4 3/6] mdev: introduce device specific ops

2019-10-17 Thread Alex Williamson
On Thu, 17 Oct 2019 17:07:55 +0200 Cornelia Huck wrote: > On Thu, 17 Oct 2019 18:48:33 +0800 > Jason Wang wrote: > > > Currently, except for the create and remove, the rest of > > mdev_parent_ops is designed for vfio-mdev driver only and may not help > > for kernel mdev driver. With the help of

Re: [PATCH V4 4/6] mdev: introduce virtio device and its device ops

2019-10-17 Thread Alex Williamson
On Thu, 17 Oct 2019 18:48:34 +0800 Jason Wang wrote: > This patch implements basic support for mdev driver that supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/mdev_core.c | 12 +++ > include/linux/mdev.h | 4 + > includ

Re: [PATCH V5 1/6] mdev: class id support

2019-10-23 Thread Alex Williamson
On Wed, 23 Oct 2019 21:07:47 +0800 Jason Wang wrote: > Mdev bus only supports vfio driver right now, so it doesn't implement > match method. But in the future, we may add drivers other than vfio, > the first driver could be virtio-mdev. This means we need to add > device class id support in bus m

Re: [PATCH V5 2/6] modpost: add support for mdev class id

2019-10-23 Thread Alex Williamson
On Wed, 23 Oct 2019 21:07:48 +0800 Jason Wang wrote: > Add support to parse mdev class id table. > > Reviewed-by: Parav Pandit > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/vfio_mdev.c | 2 ++ > scripts/mod/devicetable-offsets.c | 3 +++ > scripts/mod/file2alias.c | 10

Re: [PATCH V5 4/6] mdev: introduce virtio device and its device ops

2019-10-23 Thread Alex Williamson
On Wed, 23 Oct 2019 21:07:50 +0800 Jason Wang wrote: > This patch implements basic support for mdev driver that supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/mdev_core.c| 20 > drivers/vfio/mdev/mdev_private.h | 2 + >

Re: [PATCH V5 1/6] mdev: class id support

2019-10-24 Thread Alex Williamson
On Thu, 24 Oct 2019 11:27:36 +0800 Jason Wang wrote: > On 2019/10/24 上午5:42, Alex Williamson wrote: > > On Wed, 23 Oct 2019 21:07:47 +0800 > > Jason Wang wrote: > > > >> Mdev bus only supports vfio driver right now, so it doesn't implement > >>

Re: [PATCH V5 2/6] modpost: add support for mdev class id

2019-10-24 Thread Alex Williamson
On Thu, 24 Oct 2019 11:31:04 +0800 Jason Wang wrote: > On 2019/10/24 上午5:42, Alex Williamson wrote: > > On Wed, 23 Oct 2019 21:07:48 +0800 > > Jason Wang wrote: > > > >> Add support to parse mdev class id table. > >> > >> Reviewed-

Re: [PATCH V5 1/6] mdev: class id support

2019-10-24 Thread Alex Williamson
On Thu, 24 Oct 2019 13:46:36 -0600 Alex Williamson wrote: > On Thu, 24 Oct 2019 11:27:36 +0800 > Jason Wang wrote: > > > On 2019/10/24 上午5:42, Alex Williamson wrote: > > > On Wed, 23 Oct 2019 21:07:47 +0800 > > > Jason Wang wrote: > > > >

Re: [PATCH V5 4/6] mdev: introduce virtio device and its device ops

2019-10-24 Thread Alex Williamson
On Thu, 24 Oct 2019 11:51:35 +0800 Jason Wang wrote: > On 2019/10/24 上午5:57, Alex Williamson wrote: > > On Wed, 23 Oct 2019 21:07:50 +0800 > > Jason Wang wrote: > > > >> This patch implements basic support for mdev driver that supports > >> vi

Re: [RFC PATCH 0/2] Mdev: support mutiple kinds of devices

2019-09-17 Thread Alex Williamson
[cc +Parav] On Thu, 12 Sep 2019 17:40:10 +0800 Jason Wang wrote: > Hi all: > > During the development of virtio-mdev[1]. I find that mdev needs to be > extended to support devices other than vfio mdev device. So this > series tries to extend the mdev to be able to differ from different > device

Re: [RFC PATCH 0/2] Mdev: support mutiple kinds of devices

2019-09-17 Thread Alex Williamson
On Wed, 18 Sep 2019 01:54:43 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Wednesday, September 18, 2019 1:31 AM > > > > [cc +Parav] > > > > On Thu, 12 Sep 2019 17:40:10 +0800 > > Jason Wang wrote: > > > > &

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 u

Re: [PATCH 1/6] mdev: class id support

2019-09-23 Thread Alex Williamson
On Mon, 23 Sep 2019 21:03:26 +0800 Jason Wang wrote: > Mdev bus only supports vfio driver right now, so it doesn't implement > match method. But in the future, we may add drivers other than vfio, > one example is virtio-mdev[1] driver. This means we need to add device > class id support in bus ma

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

2019-09-24 Thread Alex Williamson
On Mon, 23 Sep 2019 12:00:41 -0400 "Michael S. Tsirkin" wrote: > On Mon, Sep 23, 2019 at 09:45:59AM -0600, Alex Williamson wrote: > > On Mon, 23 Sep 2019 21:03:30 +0800 > > Jason Wang wrote: > > > > > We want to copy from iov to buf, so the directi

Re: [PATCH V2 2/8] mdev: class id support

2019-09-24 Thread Alex Williamson
On Tue, 24 Sep 2019 21:53:26 +0800 Jason Wang wrote: > Mdev bus only supports vfio driver right now, so it doesn't implement > match method. But in the future, we may add drivers other than vfio, > the first driver could be virtio-mdev. This means we need to add > device class id support in bus m

Re: [PATCH V2 5/8] mdev: introduce device specific ops

2019-09-24 Thread Alex Williamson
On Tue, 24 Sep 2019 21:53:29 +0800 Jason Wang wrote: > Currently, except for the create and remove, the rest of > mdev_parent_ops is designed for vfio-mdev driver only and may not help > for kernel mdev driver. With the help of class id, this patch > introduces device specific callbacks inside md

Re: [PATCH V2 6/8] mdev: introduce virtio device and its device ops

2019-09-24 Thread Alex Williamson
On Tue, 24 Sep 2019 21:53:30 +0800 Jason Wang wrote: > This patch implements basic support for mdev driver that supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang > --- > include/linux/mdev.h| 2 + > include/linux/virtio_mdev.h | 145 +

Re: [PATCH V2 5/8] mdev: introduce device specific ops

2019-09-25 Thread Alex Williamson
On Wed, 25 Sep 2019 10:11:00 -0400 Rob Miller wrote: > > > On Tue, 24 Sep 2019 21:53:29 +0800 > > > Jason Wang wrote: > > > > diff --git a/drivers/vfio/mdev/vfio_mdev.c > > > b/drivers/vfio/mdev/vfio_mdev.c > > > > index 891cf83a2d9a..95efa054442f 100644 > > > > --- a/drivers/vfio/mdev/vfio_m

Re: [PATCH V2 5/8] mdev: introduce device specific ops

2019-09-26 Thread Alex Williamson
On Thu, 26 Sep 2019 11:46:55 -0400 "Michael S. Tsirkin" wrote: > On Wed, Sep 25, 2019 at 10:30:28AM -0600, Alex Williamson wrote: > > On Wed, 25 Sep 2019 10:11:00 -0400 > > Rob Miller wrote: > > > > > On Tue, 24 Sep 2019 21:53:29 +0800 > > >

Re: [PATCH V2 6/8] mdev: introduce virtio device and its device ops

2019-09-30 Thread Alex Williamson
On Fri, 27 Sep 2019 16:25:13 + Parav Pandit wrote: > Hi Alex, > > > > -Original Message- > > From: Alex Williamson > > Sent: Tuesday, September 24, 2019 6:07 PM > > To: Jason Wang > > Cc: k...@vger.kernel.org; linux-s...@vger.kernel.org;

Re: [PATCH v7 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-21 Thread Alex Williamson
ged, 27 insertions(+), 30 deletions(-) Tested with device assignment and Intel mdev vGPU assignment with QEMU userspace: Tested-by: Alex Williamson Acked-by: Alex Williamson Feel free to include for 19/24 as well. Thanks, Alex > diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio

Re: Allow mdev drivers to directly create the vfio_device (v3)

2021-06-15 Thread Alex Williamson
On Tue, 15 Jun 2021 15:35:09 +0200 Christoph Hellwig wrote: > This is my alternative take on this series from Jason: > > https://lore.kernel.org/dri-devel/87czsszi9i@redhat.com/T/ > > The mdev/vfio parts are exactly the same, but this solves the driver core > changes for the direct probing

Re: [PATCH 04/10] driver core: Don't return EPROBE_DEFER to userspace during sysfs bind

2021-06-15 Thread Alex Williamson
On Tue, 15 Jun 2021 15:35:13 +0200 Christoph Hellwig wrote: > @@ -547,10 +538,9 @@ static int call_driver_probe(struct device *dev, struct > device_driver *drv) > > static int really_probe(struct device *dev, struct device_driver *drv) > { > - int local_trigger_count = atomic_read(&defer

  1   2   >