search for: vhost_iotlb_msg

Displaying 20 results from an estimated 49 matches for "vhost_iotlb_msg".

2018 Aug 03
4
[PATCH net-next] vhost: switch to use new message format
We use to have message like: struct vhost_msg { int type; union { struct vhost_iotlb_msg iotlb; __u8 padding[64]; }; }; Unfortunately, there will be a hole of 32bit in 64bit machine because of the alignment. This leads a different formats between 32bit API and 64bit API. What's more it will break 32bit program running on 64bit machine. So fixing this by introducing a new messa...
2018 Aug 03
4
[PATCH net-next] vhost: switch to use new message format
We use to have message like: struct vhost_msg { int type; union { struct vhost_iotlb_msg iotlb; __u8 padding[64]; }; }; Unfortunately, there will be a hole of 32bit in 64bit machine because of the alignment. This leads a different formats between 32bit API and 64bit API. What's more it will break 32bit program running on 64bit machine. So fixing this by introducing a new messa...
2018 Aug 06
1
[PATCH net-next V2] vhost: switch to use new message format
We use to have message like: struct vhost_msg { int type; union { struct vhost_iotlb_msg iotlb; __u8 padding[64]; }; }; Unfortunately, there will be a hole of 32bit in 64bit machine because of the alignment. This leads a different formats between 32bit API and 64bit API. What's more it will break 32bit program running on 64bit machine. So fixing this by introducing a new messa...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...? >>> >>> Thanks, >>> Tiwei >> I think so. Michael, do you think this makes sense? >> >> Thanks > to make sure, could you post the suggested argument format for > these ioctls? > It's the existed uapi: /* no alignment requirement */ struct vhost_iotlb_msg { ??? __u64 iova; ??? __u64 size; ??? __u64 uaddr; #define VHOST_ACCESS_RO????? 0x1 #define VHOST_ACCESS_WO????? 0x2 #define VHOST_ACCESS_RW????? 0x3 ??? __u8 perm; #define VHOST_IOTLB_MISS?????????? 1 #define VHOST_IOTLB_UPDATE???????? 2 #define VHOST_IOTLB_INVALIDATE???? 3 #define VHOST_IOTLB...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...? >>> >>> Thanks, >>> Tiwei >> I think so. Michael, do you think this makes sense? >> >> Thanks > to make sure, could you post the suggested argument format for > these ioctls? > It's the existed uapi: /* no alignment requirement */ struct vhost_iotlb_msg { ??? __u64 iova; ??? __u64 size; ??? __u64 uaddr; #define VHOST_ACCESS_RO????? 0x1 #define VHOST_ACCESS_WO????? 0x2 #define VHOST_ACCESS_RW????? 0x3 ??? __u8 perm; #define VHOST_IOTLB_MISS?????????? 1 #define VHOST_IOTLB_UPDATE???????? 2 #define VHOST_IOTLB_INVALIDATE???? 3 #define VHOST_IOTLB...
2018 Aug 03
0
[PATCH net-next] vhost: switch to use new message format
On Fri, Aug 03, 2018 at 03:04:51PM +0800, Jason Wang wrote: > We use to have message like: > > struct vhost_msg { > int type; > union { > struct vhost_iotlb_msg iotlb; > __u8 padding[64]; > }; > }; > > Unfortunately, there will be a hole of 32bit in 64bit machine because > of the alignment. This leads a different formats between 32bit API and > 64bit API. What's more it will break 32bit program running on 64bit > machine. &g...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
.... Michael, do you think this makes sense? >>>> >>>> Thanks >>> to make sure, could you post the suggested argument format for >>> these ioctls? >>> >> It's the existed uapi: >> >> /* no alignment requirement */ >> struct vhost_iotlb_msg { >> ??? __u64 iova; >> ??? __u64 size; >> ??? __u64 uaddr; >> #define VHOST_ACCESS_RO????? 0x1 >> #define VHOST_ACCESS_WO????? 0x2 >> #define VHOST_ACCESS_RW????? 0x3 >> ??? __u8 perm; >> #define VHOST_IOTLB_MISS?????????? 1 >> #define VHOS...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
.... Michael, do you think this makes sense? >>>> >>>> Thanks >>> to make sure, could you post the suggested argument format for >>> these ioctls? >>> >> It's the existed uapi: >> >> /* no alignment requirement */ >> struct vhost_iotlb_msg { >> ??? __u64 iova; >> ??? __u64 size; >> ??? __u64 uaddr; >> #define VHOST_ACCESS_RO????? 0x1 >> #define VHOST_ACCESS_WO????? 0x2 >> #define VHOST_ACCESS_RW????? 0x3 >> ??? __u8 perm; >> #define VHOST_IOTLB_MISS?????????? 1 >> #define VHOS...
2020 Jun 28
2
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
On Thu, Jun 18, 2020 at 01:56:25PM +0800, Jason Wang wrote: > This patches extend the vhost IOTLB API to accept batch updating hints > form userspace. When userspace wants update the device IOTLB in a > batch, it may do: > > 1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag > 2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE > 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag As long as we are extending the interface, is there some way we could cut down the number of system calls needed here? >...
2020 Jun 28
2
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
On Thu, Jun 18, 2020 at 01:56:25PM +0800, Jason Wang wrote: > This patches extend the vhost IOTLB API to accept batch updating hints > form userspace. When userspace wants update the device IOTLB in a > batch, it may do: > > 1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag > 2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE > 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag As long as we are extending the interface, is there some way we could cut down the number of system calls needed here? >...
2020 Feb 05
1
[PATCH] vhost: introduce vDPA based backend
...gt;>>>> Thanks >>>>> to make sure, could you post the suggested argument format for >>>>> these ioctls? >>>>> >>>> It's the existed uapi: >>>> >>>> /* no alignment requirement */ >>>> struct vhost_iotlb_msg { >>>> ??? __u64 iova; >>>> ??? __u64 size; >>>> ??? __u64 uaddr; >>>> #define VHOST_ACCESS_RO????? 0x1 >>>> #define VHOST_ACCESS_WO????? 0x2 >>>> #define VHOST_ACCESS_RW????? 0x3 >>>> ??? __u8 perm; >&gt...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...> > I think so. Michael, do you think this makes sense? > > > > > > Thanks > > to make sure, could you post the suggested argument format for > > these ioctls? > > > > It's the existed uapi: > > /* no alignment requirement */ > struct vhost_iotlb_msg { > ??? __u64 iova; > ??? __u64 size; > ??? __u64 uaddr; > #define VHOST_ACCESS_RO????? 0x1 > #define VHOST_ACCESS_WO????? 0x2 > #define VHOST_ACCESS_RW????? 0x3 > ??? __u8 perm; > #define VHOST_IOTLB_MISS?????????? 1 > #define VHOST_IOTLB_UPDATE???????? 2 > #define VH...
2020 Jun 29
1
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...On Thu, Jun 18, 2020 at 01:56:25PM +0800, Jason Wang wrote: > > > This patches extend the vhost IOTLB API to accept batch updating hints > > > form userspace. When userspace wants update the device IOTLB in a > > > batch, it may do: > > > > > > 1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag > > > 2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE > > > 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag > > As long as we are extending the interface, > > is there some way we could cut down the numb...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
On 2020/2/5 ??10:05, Tiwei Bie wrote: > On Tue, Feb 04, 2020 at 02:46:16PM +0800, Jason Wang wrote: >> On 2020/2/4 ??2:01, Michael S. Tsirkin wrote: >>> On Tue, Feb 04, 2020 at 11:30:11AM +0800, Jason Wang wrote: >>>> 5) generate diffs of memory table and using IOMMU API to setup the dma >>>> mapping in this method >>> Frankly I think that's a
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
On 2020/2/5 ??10:05, Tiwei Bie wrote: > On Tue, Feb 04, 2020 at 02:46:16PM +0800, Jason Wang wrote: >> On 2020/2/4 ??2:01, Michael S. Tsirkin wrote: >>> On Tue, Feb 04, 2020 at 11:30:11AM +0800, Jason Wang wrote: >>>> 5) generate diffs of memory table and using IOMMU API to setup the dma >>>> mapping in this method >>> Frankly I think that's a
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...t; > > > > > Thanks > > > > to make sure, could you post the suggested argument format for > > > > these ioctls? > > > > > > > It's the existed uapi: > > > > > > /* no alignment requirement */ > > > struct vhost_iotlb_msg { > > > ??? __u64 iova; > > > ??? __u64 size; > > > ??? __u64 uaddr; > > > #define VHOST_ACCESS_RO????? 0x1 > > > #define VHOST_ACCESS_WO????? 0x2 > > > #define VHOST_ACCESS_RW????? 0x3 > > > ??? __u8 perm; > > > #define VH...
2020 Jun 18
0
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
This patches extend the vhost IOTLB API to accept batch updating hints form userspace. When userspace wants update the device IOTLB in a batch, it may do: 1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag 2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when vDPA device support set_map() ops. This is useful for the vDPA de...
2020 Jun 29
0
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...Michael S. Tsirkin wrote: > On Thu, Jun 18, 2020 at 01:56:25PM +0800, Jason Wang wrote: >> This patches extend the vhost IOTLB API to accept batch updating hints >> form userspace. When userspace wants update the device IOTLB in a >> batch, it may do: >> >> 1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag >> 2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE >> 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag > As long as we are extending the interface, > is there some way we could cut down the number of system calls nee...
2020 Jun 18
6
[PATCH RFC 0/5] support batched IOTLB updating in vhost-vdpa
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is deisgend to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
2020 May 29
0
[PATCH 1/6] vhost: allow device that does not depend on vhost worker
...@@ static size_t vhost_get_desc_size(struct vhost_virtqueue *vq, void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs, int iov_limit, int weight, int byte_weight, + bool use_worker, int (*msg_handler)(struct vhost_dev *dev, struct vhost_iotlb_msg *msg)) { @@ -471,6 +477,7 @@ void vhost_dev_init(struct vhost_dev *dev, dev->iov_limit = iov_limit; dev->weight = weight; dev->byte_weight = byte_weight; + dev->use_worker = use_worker; dev->msg_handler = msg_handler; init_llist_head(&dev->work_list); init_waitque...