Displaying 20 results from an estimated 30 matches for "vhost_access_rw".
Did you mean:
vhost_access_ro
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...; 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_ACCESS_FAIL??? 4
??? __u8 type;
};
#define VHOST_IOTLB_MSG 0x1
#define VHOST_IOTLB_MSG_V2 0x2
struct vhost_msg {
??? int type;
??? union {...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...; 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_ACCESS_FAIL??? 4
??? __u8 type;
};
#define VHOST_IOTLB_MSG 0x1
#define VHOST_IOTLB_MSG_V2 0x2
struct vhost_msg {
??? int type;
??? union {...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...>> 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_ACCESS_FAIL??? 4
>> ??? __u8 type;
>> };
>>
>> #define VHOST_IOTLB_MSG 0x...
2020 Feb 05
2
[PATCH] vhost: introduce vDPA based backend
...>> 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_ACCESS_FAIL??? 4
>> ??? __u8 type;
>> };
>>
>> #define VHOST_IOTLB_MSG 0x...
2019 Oct 03
1
[PATCH 07/11] vhost: convert vhost_umem_interval_tree to half closed intervals
...1454,7 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
region->guest_phys_addr,
region->memory_size,
region->guest_phys_addr +
- region->memory_size - 1,
+ region->memory_size,
region->userspace_addr,
VHOST_ACCESS_RW))
goto err;
@@ -2055,7 +2054,7 @@ static int translate_desc(struct vhost_virtqueue *vq, u64 addr, u32 len,
}
node = vhost_umem_interval_tree_iter_first(&umem->umem_tree,
- addr, addr + len - 1);
+ addr, addr + len);
if (node == NULL || node->start > addr)...
2020 Feb 05
1
[PATCH] vhost: introduce vDPA based backend
...o 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_ACCESS_FAIL??? 4
>>>> ??? __u8 type;
>&g...
2016 Apr 27
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...vzalloc(sizeof(*node));
> - if (!node)
> + if (vhost_new_umem_range(newumem,
> + region->guest_phys_addr,
> + region->memory_size,
> + region->guest_phys_addr +
> + region->memory_size - 1,
> + region->userspace_addr,
> + VHOST_ACCESS_RW))
> goto err;
> - node->start = region->guest_phys_addr;
> - node->size = region->memory_size;
> - node->last = node->start + node->size - 1;
> - node->userspace_addr = region->userspace_addr;
> - INIT_LIST_HEAD(&node->link);
> - list...
2016 Apr 27
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...vzalloc(sizeof(*node));
> - if (!node)
> + if (vhost_new_umem_range(newumem,
> + region->guest_phys_addr,
> + region->memory_size,
> + region->guest_phys_addr +
> + region->memory_size - 1,
> + region->userspace_addr,
> + VHOST_ACCESS_RW))
> goto err;
> - node->start = region->guest_phys_addr;
> - node->size = region->memory_size;
> - node->last = node->start + node->size - 1;
> - node->userspace_addr = region->userspace_addr;
> - INIT_LIST_HEAD(&node->link);
> - list...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...r
> > 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_ACCESS_FAIL??? 4
> ??? __u8 type;
> };
>
> #define VHOST_IOTLB_MSG 0x1
> #define VHOST_IOTLB_MSG_V2 0x2...
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; > > /* 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_ACCESS_FAIL??? 4
> > > ??? __u8 type;
> > > };
&g...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...; + __u64 userspace_addr;
> > Alignment requirements?
>
> The API does not require any alignment. Will add a comment for this.
>
> >
> >> + struct {
> >> +#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
> >> + __u8 type;
> >> +#define VHOST_IOTLB_INVALID 0x1
> >> +#define...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...; + __u64 userspace_addr;
> > Alignment requirements?
>
> The API does not require any alignment. Will add a comment for this.
>
> >
> >> + struct {
> >> +#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
> >> + __u8 type;
> >> +#define VHOST_IOTLB_INVALID 0x1
> >> +#define...
2016 Apr 28
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...+ __u64 iova;
>> + __u64 size;
>> + __u64 userspace_addr;
> Alignment requirements?
The API does not require any alignment. Will add a comment for this.
>
>> + struct {
>> +#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
>> + __u8 type;
>> +#define VHOST_IOTLB_INVALID 0x1
>> +#define VHOST_IOTLB_VALID 0x2
>...
2016 Mar 25
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...ns;
region++) {
- node = vhost_kvzalloc(sizeof(*node));
- if (!node)
+ if (vhost_new_umem_range(newumem,
+ region->guest_phys_addr,
+ region->memory_size,
+ region->guest_phys_addr +
+ region->memory_size - 1,
+ region->userspace_addr,
+ VHOST_ACCESS_RW))
goto err;
- node->start = region->guest_phys_addr;
- node->size = region->memory_size;
- node->last = node->start + node->size - 1;
- node->userspace_addr = region->userspace_addr;
- INIT_LIST_HEAD(&node->link);
- list_add_tail(&node->link, &...
2016 Apr 29
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...u64 userspace_addr;
>>> Alignment requirements?
>> The API does not require any alignment. Will add a comment for this.
>>
>>>> + struct {
>>>> +#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
>>>> + __u8 type;
>>>> +#define VHOST_IOTLB_INVALID 0x1
>...
2016 Jun 22
0
[PATCH 3/3] vhost: device IOTLB API
....nregions;
region++) {
- node = vhost_kvzalloc(sizeof(*node));
- if (!node)
+ if (vhost_new_umem_range(newumem,
+ region->guest_phys_addr,
+ region->memory_size,
+ region->guest_phys_addr +
+ region->memory_size - 1,
+ region->userspace_addr,
+ VHOST_ACCESS_RW))
goto err;
- node->start = region->guest_phys_addr;
- node->size = region->memory_size;
- node->last = node->start + node->size - 1;
- node->userspace_addr = region->userspace_addr;
- INIT_LIST_HEAD(&node->link);
- list_add_tail(&node->link, &...
2016 Mar 25
4
[RFC PATCH V2 0/2] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace(qemu) implementation of
iommu for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- Fill the translation request in a preset userspace address (This
2016 Mar 25
4
[RFC PATCH V2 0/2] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace(qemu) implementation of
iommu for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- Fill the translation request in a preset userspace address (This