Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-19 Thread Jason Wang
On 2019/9/20 上午10:16, Tiwei Bie wrote: On Fri, Sep 20, 2019 at 09:30:58AM +0800, Jason Wang wrote: On 2019/9/19 下午11:45, Tiwei Bie wrote: On Thu, Sep 19, 2019 at 09:08:11PM +0800, Jason Wang wrote: On 2019/9/18 下午10:32, Michael S. Tsirkin wrote: So I have some questions: 1) Compared to

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-19 Thread Tiwei Bie
On Fri, Sep 20, 2019 at 09:30:58AM +0800, Jason Wang wrote: > On 2019/9/19 下午11:45, Tiwei Bie wrote: > > On Thu, Sep 19, 2019 at 09:08:11PM +0800, Jason Wang wrote: > > > On 2019/9/18 下午10:32, Michael S. Tsirkin wrote: > > > > > > > So I have some questions: > > > > > > > > > > > > > > 1)

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-19 Thread Jason Wang
On 2019/9/19 下午11:45, Tiwei Bie wrote: On Thu, Sep 19, 2019 at 09:08:11PM +0800, Jason Wang wrote: On 2019/9/18 下午10:32, Michael S. Tsirkin wrote: So I have some questions: 1) Compared to method 2, what's the advantage of creating a new vhost char device? I guess it's for keep the API

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-19 Thread Jason Wang
On 2019/9/19 下午11:45, Tiwei Bie wrote: On Thu, Sep 19, 2019 at 09:08:11PM +0800, Jason Wang wrote: On 2019/9/18 下午10:32, Michael S. Tsirkin wrote: So I have some questions: 1) Compared to method 2, what's the advantage of creating a new vhost char device? I guess it's for keep the API

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-19 Thread Tiwei Bie
On Thu, Sep 19, 2019 at 09:08:11PM +0800, Jason Wang wrote: > On 2019/9/18 下午10:32, Michael S. Tsirkin wrote: > > > > > So I have some questions: > > > > > > > > > > 1) Compared to method 2, what's the advantage of creating a new vhost > > > > > char > > > > > device? I guess it's for keep the

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-19 Thread Jason Wang
On 2019/9/18 下午10:32, Michael S. Tsirkin wrote: So I have some questions: 1) Compared to method 2, what's the advantage of creating a new vhost char device? I guess it's for keep the API compatibility? One benefit is that we can avoid doing vhost ioctls on VFIO device fd. Yes, but any

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-18 Thread Michael S. Tsirkin
On Wed, Sep 18, 2019 at 01:51:21PM +0800, Jason Wang wrote: > > On 2019/9/17 下午6:58, Tiwei Bie wrote: > > On Tue, Sep 17, 2019 at 11:32:03AM +0800, Jason Wang wrote: > > > On 2019/9/17 上午9:02, Tiwei Bie wrote: > > > > This RFC is to demonstrate below ideas, > > > > > > > > a) Build vhost-mdev on

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-17 Thread Jason Wang
On 2019/9/17 下午6:58, Tiwei Bie wrote: On Tue, Sep 17, 2019 at 11:32:03AM +0800, Jason Wang wrote: On 2019/9/17 上午9:02, Tiwei Bie wrote: This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-17 Thread Tiwei Bie
On Tue, Sep 17, 2019 at 11:32:03AM +0800, Jason Wang wrote: > On 2019/9/17 上午9:02, Tiwei Bie wrote: > > This RFC is to demonstrate below ideas, > > > > a) Build vhost-mdev on top of the same abstraction defined in > > the virtio-mdev series [1]; > > > > b) Introduce /dev/vhost-mdev to do

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-16 Thread Jason Wang
On 2019/9/17 上午9:02, Tiwei Bie wrote: This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API

Re: [RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-16 Thread Jason Wang
On 2019/9/17 上午9:02, Tiwei Bie wrote: This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API

[RFC v4 0/3] vhost: introduce mdev based hardware backend

2019-09-16 Thread Tiwei Bie
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a