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

2019-09-27 Thread Jason Wang
On 2019/9/25 下午10:11, Rob Miller wrote: > >     mdev_set_class_id(mdev, MDEV_ID_VFIO); > > +   mdev_set_dev_ops(mdev, &intel_vfio_vgpu_dev_ops); > > This seems rather unrefined.  We're registering interdependent data in > separate calls.  All drivers need to make both of these calls.  I'm not >

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

2019-09-26 Thread Michael S. Tsirkin
On Thu, Sep 26, 2019 at 10:26:08AM -0600, Alex Williamson wrote: > 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

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 > > > > > Jason Wang wrote: > > > > > > diff --git a/dr

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

2019-09-26 Thread Michael S. Tsirkin
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 > > > > Jason Wang wrote: > > > > > diff --git a/drivers/vfio/mdev/vfio_mdev.c > > > > b/drivers/vfio/mdev/vfio_mdev.c > > > > >

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

2019-09-26 Thread Rob Miller
On Wed, Sep 25, 2019 at 4:52 AM Tian, Kevin wrote: > > From: Alex Williamson > > Sent: Wednesday, September 25, 2019 7:07 AM > > > > 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 v

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-25 Thread Jason Wang
On 2019/9/25 上午7:06, Alex Williamson wrote: > 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 p

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

2019-09-25 Thread Tian, Kevin
> From: Alex Williamson > Sent: Wednesday, September 25, 2019 7:07 AM > > 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. W

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

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

2019-09-24 Thread Jason Wang
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 mdev_device structure. This allows different set of callback to b