Re: [Intel-gfx] [PATCH v2 7/7] vfio: Remove vfio_free_device

2022-11-02 Thread Cornelia Huck
1 - > samples/vfio-mdev/mbochs.c| 1 - > samples/vfio-mdev/mdpy.c | 1 - > samples/vfio-mdev/mtty.c | 1 - > 12 files changed, 4 insertions(+), 35 deletions(-) Reviewed-by: Cornelia Huck

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

2022-07-20 Thread Cornelia Huck
On Tue, Jul 19 2022, Jason Gunthorpe wrote: > On Thu, Jul 07, 2022 at 03:37:16PM -0600, Alex Williamson wrote: >> 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..09e0

Re: [Intel-gfx] [PATCH v2 6/9] vfio/mdev: Add mdev available instance checking to the core

2021-09-20 Thread Cornelia Huck
On Thu, Sep 09 2021, Jason Gunthorpe wrote: > Many of the mdev drivers use a simple counter for keeping track of the > available instances. Move this code to the core code and store the counter > in the mdev_type. Implement it using correct locking, fixing mdpy. > > Drivers provide a get_availabl

Re: [Intel-gfx] [PATCH v2 4/9] vfio/ccw: Make the FSM complete and synchronize it to the mdev

2021-09-20 Thread Cornelia Huck
On Thu, Sep 09 2021, Jason Gunthorpe wrote: > The subchannel should be left in a quiescent state unless the VFIO device > FD is opened. When the FD is opened bring the chanel to active and allow > the VFIO device to operate. When the device FD is closed then quiesce the > channel. > > To make thi

Re: [Intel-gfx] [PATCH v2 2/9] vfio/ccw: Pass vfio_ccw_private not mdev_device to various functions

2021-09-20 Thread Cornelia Huck
gt; drivers/s390/cio/vfio_ccw_ops.c | 37 + > 1 file changed, 15 insertions(+), 22 deletions(-) Reviewed-by: Cornelia Huck

Re: [Intel-gfx] [PATCH v2 0/9] Move vfio_ccw to the new mdev API

2021-09-17 Thread Cornelia Huck
On Fri, Sep 17 2021, Jason Gunthorpe wrote: > On Fri, Sep 17, 2021 at 01:59:16PM +0200, Cornelia Huck wrote: >> >ret = cio_cancel_halt_clear(sch, &iretry); >> > - >> >if (ret == -EIO) { >> >pr_err("vfio_c

Re: [Intel-gfx] [PATCH v2 0/9] Move vfio_ccw to the new mdev API

2021-09-17 Thread Cornelia Huck
On Tue, Sep 14 2021, Jason Gunthorpe wrote: > On Mon, Sep 13, 2021 at 04:31:54PM -0400, Eric Farman wrote: >> > I rebased it and fixed it up here: >> > >> > https://github.com/jgunthorpe/linux/tree/vfio_ccw >> > >> > Can you try again? >> >> That does address the crash, but then why is it proc

Re: [Intel-gfx] [PATCH v2 1/9] vfio/ccw: Use functions for alloc/free of the vfio_ccw_private

2021-09-14 Thread Cornelia Huck
On Fri, Sep 10 2021, Christoph Hellwig wrote: > On Thu, Sep 09, 2021 at 04:38:41PM -0300, Jason Gunthorpe wrote: >> + >> +private = kzalloc(sizeof(*private), GFP_KERNEL | GFP_DMA); >> +if (!private) >> +return ERR_PTR(-ENOMEM); > > Nit: there is no need to add GFP_KERNEL when

Re: [Intel-gfx] [PATCH v4 14/14] vfio: Remove struct vfio_device_ops open/release

2021-08-11 Thread Cornelia Huck
io/vfio.c | 14 +- > include/linux/mdev.h | 7 --- > include/linux/vfio.h | 4 > 4 files changed, 1 insertion(+), 46 deletions(-) Reviewed-by: Cornelia Huck

Re: [Intel-gfx] [PATCH v4 10/14] vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set

2021-08-11 Thread Cornelia Huck
> This eliminates a memory allocation and get/put traffic and another > improperly locked test of pci_dev_driver(). > > Reviewed-off-by: Christoph Hellwig > Signed-off-by: Jason Gunthorpe > --- > drivers/vfio/pci/vfio_pci.c | 213 +++----- > 1 file changed, 89 insertions(+), 124 deletions(-) Reviewed-by: Cornelia Huck

Re: [Intel-gfx] [PATCH v4 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-08-11 Thread Cornelia Huck
evice_lock() and removes a hard wiring to &vfio_pci_driver. > > Signed-off-by: Jason Gunthorpe > --- > drivers/vfio/pci/vfio_pci.c | 182 +++++--- > 1 file changed, 86 insertions(+), 96 deletions(-) Reviewed-by: Cornelia Huck

Re: [Intel-gfx] [PATCH v4 08/14] vfio/pci: Move to the device set infrastructure

2021-08-11 Thread Cornelia Huck
y: Yishai Hadas > Reviewed-by: Christoph Hellwig > Signed-off-by: Jason Gunthorpe > --- > drivers/vfio/pci/vfio_pci.c | 162 +++- > drivers/vfio/pci/vfio_pci_private.h | 7 -- > 2 files changed, 37 insertions(+), 132 deletions(-) Reviewed-by: Cornelia Huck

Re: [Intel-gfx] [PATCH v4 02/14] vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes

2021-08-11 Thread Cornelia Huck
81c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()") > Reported-by: Cornelia Huck > Co-developed-by: Alex Williamson > Reviewed-by: Christoph Hellwig > Signed-off-by: Jason Gunthorpe > --- > samples/vfio-mdev/mbochs.c | 24 +++- &g

Re: [Intel-gfx] [PATCH v2 07/14] vfio/platform: Use open_device() instead of open coding a refcnt scheme

2021-07-22 Thread Cornelia Huck
ned-off-by: Yishai Hadas > Signed-off-by: Jason Gunthorpe > --- > drivers/vfio/platform/vfio_platform_common.c | 79 --- > drivers/vfio/platform/vfio_platform_private.h | 1 - > 2 files changed, 32 insertions(+), 48 deletio

Re: [Intel-gfx] [PATCH v2 04/14] vfio: Provide better generic support for open/release vfio_device_ops

2021-07-22 Thread Cornelia Huck
46 +- > include/linux/mdev.h | 2 + > include/linux/vfio.h | 19 + > 4 files changed, 167 insertions(+), 22 deletions(-) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v2 03/14] vfio: Introduce a vfio_uninit_group_dev() API call

2021-07-21 Thread Cornelia Huck
ples/vfio-mdev/mbochs.c | 2 ++ > samples/vfio-mdev/mdpy.c | 25 ++ > samples/vfio-mdev/mtty.c | 27 > 10 files changed, 64 insertions(+), 33 deletions(-) Reviewed-by: Cornelia Huck ___

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

2021-07-21 Thread Cornelia Huck
On Tue, Jul 20 2021, Jason Gunthorpe wrote: > On Tue, Jul 20, 2021 at 04:01:27PM -0600, Alex Williamson wrote: >> Hmm, doesn't this suggest we need another atomic conversion? (untested) > > Sure why not, I can add this as another patch Yes, I think that should be another patch. ___

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

2021-07-21 Thread Cornelia Huck
On Tue, Jul 20 2021, 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 Huc

Re: [Intel-gfx] [PATCH 12/13] vfio/gvt: Fix open/close when multiple device FDs are open

2021-07-19 Thread Cornelia Huck
ertions(+), 4 deletions(-) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 10/13] vfio/mbochs: Fix close when multiple device FDs are open

2021-07-19 Thread Cornelia Huck
_device() so it only runs on the last close. > > Signed-off-by: Jason Gunthorpe > --- > samples/vfio-mdev/mbochs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-g

Re: [Intel-gfx] [PATCH 11/13] vfio/ap, ccw: Fix open/close when multiple device FDs are open

2021-07-19 Thread Cornelia Huck
drivers/s390/crypto/vfio_ap_ops.c | 8 > 2 files changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 04/13] vfio/samples: Delete useless open/close

2021-07-19 Thread Cornelia Huck
t; Signed-off-by: Jason Gunthorpe > --- > samples/vfio-mdev/mbochs.c | 6 -- > samples/vfio-mdev/mdpy.c | 11 --- > samples/vfio-mdev/mtty.c | 13 - > 3 files changed, 30 deletions(-) Reviewed-by: Cornelia Huck __

Re: [Intel-gfx] [PATCH 03/13] vfio: Provide better generic support for open/release vfio_device_ops

2021-07-19 Thread Cornelia Huck
On Wed, Jul 14 2021, Jason Gunthorpe wrote: > Currently the driver ops have an open/release pair that is called once > each time a device FD is opened or closed. Add an additional set of > open/close_device() ops which are called when the device FD is opened for > the first time and closed for th

Re: [Intel-gfx] [PATCH 02/13] vfio: Introduce a vfio_uninit_group_dev() API call

2021-07-19 Thread Cornelia Huck
On Mon, Jul 19 2021, Jason Gunthorpe wrote: > On Mon, Jul 19, 2021 at 02:11:38PM +0200, Cornelia Huck wrote: >> On Wed, Jul 14 2021, Jason Gunthorpe wrote: >> >> > From: Max Gurtovoy >> > >> > This pairs with vfio_init_group_dev() and allows un

Re: [Intel-gfx] [PATCH 02/13] vfio: Introduce a vfio_uninit_group_dev() API call

2021-07-19 Thread Cornelia Huck
On Wed, Jul 14 2021, Jason Gunthorpe wrote: > From: Max Gurtovoy > > This pairs with vfio_init_group_dev() and allows undoing any state that is > stored in the vfio_device unrelated to registration. Add appropriately > placed calls to all the drivers. > > The following patch will use this to add

Re: [Intel-gfx] [PATCH 01/13] vfio/samples: Remove module get/put

2021-07-19 Thread Cornelia Huck
c01 ("vfio/mdpy: Convert to use vfio_register_group_dev()") > Fixes: 681c1615f891 ("vfio/mbochs: Convert to use vfio_register_group_dev()") > Signed-off-by: Jason Gunthorpe > --- > samples/vfio-mdev/mbochs.c | 4 > samples/vfio-mdev/mdpy.c | 4 > 2

Re: [Intel-gfx] [PATCH 07/10] vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind

2021-06-15 Thread Cornelia Huck
son Gunthorpe > Signed-off-by: Christoph Hellwig > --- > drivers/vfio/mdev/mdev_core.c | 30 ++ > drivers/vfio/mdev/mdev_driver.c | 10 ++ > include/linux/mdev.h| 2 ++ > 3 files chan

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

2021-06-15 Thread Cornelia Huck
t bothering > the sysfs bind case. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Greg Kroah-Hartman > --- > drivers/base/dd.c | 78 +-- > 1 file changed, 42 insertions(+), 36 deletions(-) > Reviewed-by: Cornelia Huck

Re: [Intel-gfx] [PATCH 02/10] driver core: Better distinguish probe errors in really_probe

2021-06-15 Thread Cornelia Huck
%d\n", > + drv->name, dev_name(dev), ret); Convert these two pr_* to dev_* when touching the code anyway? > + break; > + } > + > + return ret; > +} (...) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 07/10] vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind

2021-06-15 Thread Cornelia Huck
son Gunthorpe > Signed-off-by: Christoph Hellwig > --- > drivers/vfio/mdev/mdev_core.c | 30 ++ > drivers/vfio/mdev/mdev_driver.c | 10 ++ > include/linux/mdev.h| 2 ++ > 3 files changed, 34 insertions(+), 8 deletions(-) Reviewed-by: Co

Re: [Intel-gfx] [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE

2021-06-15 Thread Cornelia Huck
6 +++--- > 9 files changed, 23 insertions(+), 40 deletions(-) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 05/10] driver core: Export device_driver_attach()

2021-06-15 Thread Cornelia Huck
to the > error return of device_driver_attach(). > > Signed-off-by: Jason Gunthorpe > Signed-off-by: Christoph Hellwig > --- > drivers/base/base.h| 1 - > drivers/base/dd.c | 3 +++ > include/linux/device.h | 2 ++ > 3 files changed, 5 insertions(+), 1 deleti

Re: [Intel-gfx] [PATCH 03/10] driver core: Flow the return code from ->probe() through to sysfs bind

2021-06-15 Thread Cornelia Huck
| 29 - > 2 files changed, 21 insertions(+), 14 deletions(-) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 01/10] driver core: Pull required checks into driver_probe_device()

2021-06-15 Thread Cornelia Huck
_driver_attach and bind_store] > Signed-off-by: Christoph Hellwig > --- > drivers/base/bus.c | 2 +- > drivers/base/dd.c | 32 ++-- > 2 files changed, 11 insertions(+), 23 deletions(-) Reviewed-by: Cornelia Huck __

Re: [Intel-gfx] [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE

2021-06-11 Thread Cornelia Huck
3 +-- > drivers/vfio/mdev/mdev_core.c| 16 ++-- > drivers/vfio/mdev/mdev_private.h | 2 ++ > drivers/vfio/mdev/vfio_mdev.c| 24 +--- > samples/Kconfig | 6 +++--- > 9 files changed, 23 insertions(+), 40 deletions(-) I t

Re: [Intel-gfx] [PATCH v2 01/13] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE

2021-04-27 Thread Cornelia Huck
This also fixes the dependencies for vfio-ccw, which never depended on VFIO_MDEV_DEVICE directly... Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 18/18] vfio/mdev: Correct the function signatures for the mdev_type_attributes

2021-03-30 Thread Cornelia Huck
vfio/mdev/mdev_sysfs.c| 11 ++- > include/linux/mdev.h | 11 +++ > samples/vfio-mdev/mbochs.c| 26 +++--- > samples/vfio-mdev/mdpy.c | 24 ++++++-- > samples/vfio-mdev/mtty.c | 18 +- > 9 fi

Re: [Intel-gfx] [PATCH 17/18] vfio/mdev: Remove kobj from mdev_parent_ops->create()

2021-03-30 Thread Cornelia Huck
amples/vfio-mdev/mbochs.c| 2 +- > samples/vfio-mdev/mdpy.c | 2 +- > samples/vfio-mdev/mtty.c | 2 +- > 8 files changed, 8 insertions(+), 9 deletions(-) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.

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

2019-11-18 Thread Cornelia Huck
On Mon, 18 Nov 2019 18:59:23 +0800 Jason Wang wrote: [Note: I have not looked into the reworked architecture of this *at all* so far; just something that I noted...] > This sample driver creates mdev device that simulate virtio net device > over virtio mdev transport. The device is implemented t

Re: [Intel-gfx] [PATCH V11 3/6] mdev: introduce device specific ops

2019-11-07 Thread Cornelia Huck
v/mbochs.c| 20 --- > samples/vfio-mdev/mdpy.c | 20 --- > samples/vfio-mdev/mtty.c | 18 --- > 13 files changed, 206 insertions(+), 99 deletions(-) > create mode 100644 include/linux/mdev_vfio_

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

2019-11-07 Thread Cornelia Huck
ng > --- > MAINTAINERS| 1 + > samples/Kconfig| 10 + > samples/vfio-mdev/Makefile | 1 + > samples/vfio-mdev/mvnet_loopback.c | 687 + > 4 files changed, 699 insertions(+) > crea

Re: [Intel-gfx] [PATCH V10 0/6] mdev based hardware virtio offloading support

2019-11-06 Thread Cornelia Huck
On Wed, 6 Nov 2019 21:35:25 +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: [Intel-gfx] [PATCH V9 5/6] virtio: introduce a mdev based transport

2019-11-06 Thread Cornelia Huck
appropriate virtio mdev device implementation that operates on a physical device to allow the datapath of virtio to be offloaded to hardware." ? > + > + If unsure, say M Building this as a module should not hurt (but please add a trailing '.' here :) &g

Re: [Intel-gfx] [PATCH V9 4/6] mdev: introduce virtio device and its device ops

2019-11-06 Thread Cornelia Huck
/mdev_core.c| 21 + > drivers/vfio/mdev/mdev_private.h | 2 + > include/linux/mdev.h | 6 ++ > include/linux/mdev_virtio_ops.h | 147 +++ > 5 files changed, 177 insertions(+) > create mode 100644 include/linux/mdev_virt

Re: [Intel-gfx] [PATCH V9 3/6] mdev: introduce device specific ops

2019-11-06 Thread Cornelia Huck
v/mbochs.c| 20 --- > samples/vfio-mdev/mdpy.c | 20 --- > samples/vfio-mdev/mtty.c | 18 --- > 13 files changed, 206 insertions(+), 99 deletions(-) > create mode 100644 include/linux/mdev_vfio_ops.h Reviewed-by

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

2019-11-05 Thread Cornelia Huck
et.c Have not really reviewed this, but looks sane at a glance. Acked-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH V8 5/6] virtio: introduce a mdev based transport

2019-11-05 Thread Cornelia Huck
ops now. > > Signed-off-by: Jason Wang > --- > drivers/virtio/Kconfig | 7 + > drivers/virtio/Makefile | 1 + > drivers/virtio/virtio_mdev.c | 407 +++ > 3 files changed, 415 insertions(+) > create mode 100644 drive

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

2019-11-05 Thread Cornelia Huck
On Tue, 5 Nov 2019 10:44:18 -0700 Alex Williamson wrote: > 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 > &

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

2019-11-05 Thread Cornelia Huck
/mdev_private.h | 2 + > include/linux/mdev.h | 6 ++ > include/linux/mdev_virtio_ops.h | 149 +++ > 4 files changed, 178 insertions(+) > create mode 100644 include/linux/mdev_virtio_ops.h Reviewed-by: Cornelia Huck

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

2019-11-05 Thread Cornelia Huck
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 class id, this patch > introduces device specific callbacks inside md

Re: [Intel-gfx] [PATCH V8 2/6] modpost: add support for mdev class id

2019-11-05 Thread Cornelia Huck
le2alias.c | 11 +++ > 3 files changed, 16 insertions(+) Reviewed-by: Cornelia Huck ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH V8 1/6] mdev: class id support

2019-11-05 Thread Cornelia Huck
d_devicetable.h | 8 ++ > samples/vfio-mdev/mbochs.c| 1 + > samples/vfio-mdev/mdpy.c | 1 + > samples/vfio-mdev/mtty.c | 1 + > 13 files changed, 76 insertions(+) Reviewed-by: Cornelia Huck _

Re: [Intel-gfx] [PATCH V4 5/6] virtio: introduce a mdev based transport

2019-10-21 Thread Cornelia Huck
On Mon, 21 Oct 2019 13:59:23 +0800 Jason Wang wrote: > On 2019/10/18 下午10:20, Cornelia Huck wrote: > > On Thu, 17 Oct 2019 18:48:35 +0800 > > Jason Wang wrote: > > > >> This patch introduces a new mdev transport for virtio. This is used to > >> use ker

Re: [Intel-gfx] [PATCH V4 5/6] virtio: introduce a mdev based transport

2019-10-18 Thread Cornelia Huck
On Thu, 17 Oct 2019 18:48:35 +0800 Jason Wang wrote: > This patch introduces a new mdev transport for virtio. This is used to > use kernel virtio driver to drive the mediated device that is capable > of populating virtqueue directly. > > A new virtio-mdev driver will be registered to the mdev bu

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

2019-10-18 Thread Cornelia Huck
On Fri, 18 Oct 2019 18:55:02 +0800 Jason Wang wrote: > On 2019/10/18 下午5:46, Cornelia Huck wrote: > > On Thu, 17 Oct 2019 18:48:34 +0800 > > Jason Wang wrote: > >> + * @get_vendor_id:Get virtio vendor id > >> + *

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

2019-10-18 Thread Cornelia Huck
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: [Intel-gfx] [PATCH V4 3/6] mdev: introduce device specific ops

2019-10-18 Thread Cornelia Huck
On Thu, 17 Oct 2019 11:53:10 -0600 Alex Williamson wrote: > 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 > &

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

2019-10-17 Thread Cornelia Huck
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 class id, this patch > introduces device specific callbacks inside md

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

2019-10-17 Thread Cornelia Huck
On Thu, 17 Oct 2019 16:30:43 +0800 Jason Wang wrote: > On 2019/10/17 上午12:53, Alex Williamson wrote: > >>> Yet another suggestion: have the class id derive from the function > >>> you use to set up the ops. > >>> > >>> void mdev_set_vfio_ops(struct mdev_device *mdev, const struct > >>> vfio_mdev

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

2019-10-16 Thread Cornelia Huck
On Wed, 16 Oct 2019 05:50:08 + Parav Pandit wrote: > Hi Alex, > > > -Original Message- > > From: Alex Williamson > > Sent: Tuesday, October 15, 2019 12:27 PM > > To: Jason Wang > > Cc: Cornelia Huck ; k...@vger.kernel.org; linux-

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

2019-10-15 Thread Cornelia Huck
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 not help > for kernel mdev driver. With the help of class id, this patch > introduces device specific callbacks inside md

Re: [Intel-gfx] [PATCH V3 2/7] mdev: bus uevent support

2019-10-15 Thread Cornelia Huck
On Fri, 11 Oct 2019 16:15:52 +0800 Jason Wang wrote: > This patch adds bus uevent support for mdev bus in order to allow > cooperation with userspace. > > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/mdev_driver.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/drivers

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

2019-10-15 Thread Cornelia Huck
On Fri, 11 Oct 2019 16:15:51 +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: [Intel-gfx] [RFC PATCH 2/2] mdev: introduce device specific ops

2019-09-17 Thread Cornelia Huck
On Thu, 12 Sep 2019 17:40:12 +0800 Jason Wang wrote: > Currently, except for the crate and remove. The rest fields of > mdev_parent_ops is just designed for vfio-mdev driver and may not help > for kernel mdev driver. So follow the device id support by previous > patch, this patch introduces devic

Re: [Intel-gfx] [RFC PATCH 1/2] mdev: device id support

2019-09-17 Thread Cornelia Huck
On Thu, 12 Sep 2019 17:40:11 +0800 Jason Wang wrote: > Mdev bus only support 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 > id support in bus match met