search for: vhost_vring_iotlb_entry

Displaying 9 results from an estimated 9 matches for "vhost_vring_iotlb_entry".

2016 Apr 27
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...ewumem->umem_tree); > } > > if (!memory_access_ok(d, newumem, 0)) > @@ -782,6 +842,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > struct vhost_vring_state s; > struct vhost_vring_file f; > struct vhost_vring_addr a; > + struct vhost_vring_iotlb_entry e; > u32 idx; > long r; > > @@ -910,6 +971,35 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > } else > filep = eventfp; > break; > + case VHOST_SET_VRING_IOTLB_REQUEST: > + r = -EFAULT; > + if (copy_from_user(&e, arg...
2016 Apr 27
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...ewumem->umem_tree); > } > > if (!memory_access_ok(d, newumem, 0)) > @@ -782,6 +842,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > struct vhost_vring_state s; > struct vhost_vring_file f; > struct vhost_vring_addr a; > + struct vhost_vring_iotlb_entry e; > u32 idx; > long r; > > @@ -910,6 +971,35 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > } else > filep = eventfp; > break; > + case VHOST_SET_VRING_IOTLB_REQUEST: > + r = -EFAULT; > + if (copy_from_user(&e, arg...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...efine VHOST_IOTLB_VALID 0x2 > >> + __u8 valid; > > why do we need this flag? > > Useless, will remove. > > > > >> + __u8 u8_padding; > >> + __u32 padding; > >> + } flags; > >> +}; > >> + > >> +struct vhost_vring_iotlb_entry { > >> + unsigned int index; > >> + __u64 userspace_addr; > >> +}; > >> + > >> struct vhost_memory_region { > >> __u64 guest_phys_addr; > >> __u64 memory_size; /* bytes */ > >> @@ -127,6 +153,15 @@ struct vhost_memory { &g...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...efine VHOST_IOTLB_VALID 0x2 > >> + __u8 valid; > > why do we need this flag? > > Useless, will remove. > > > > >> + __u8 u8_padding; > >> + __u32 padding; > >> + } flags; > >> +}; > >> + > >> +struct vhost_vring_iotlb_entry { > >> + unsigned int index; > >> + __u64 userspace_addr; > >> +}; > >> + > >> struct vhost_memory_region { > >> __u64 guest_phys_addr; > >> __u64 memory_size; /* bytes */ > >> @@ -127,6 +153,15 @@ struct vhost_memory { &g...
2016 Apr 28
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...gt;> +#define VHOST_IOTLB_INVALID 0x1 >> +#define VHOST_IOTLB_VALID 0x2 >> + __u8 valid; > why do we need this flag? Useless, will remove. > >> + __u8 u8_padding; >> + __u32 padding; >> + } flags; >> +}; >> + >> +struct vhost_vring_iotlb_entry { >> + unsigned int index; >> + __u64 userspace_addr; >> +}; >> + >> struct vhost_memory_region { >> __u64 guest_phys_addr; >> __u64 memory_size; /* bytes */ >> @@ -127,6 +153,15 @@ struct vhost_memory { >> /* Set eventfd to signal an erro...
2016 Apr 29
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...LB_VALID 0x2 >>>> + __u8 valid; >>> why do we need this flag? >> Useless, will remove. >> >>>> + __u8 u8_padding; >>>> + __u32 padding; >>>> + } flags; >>>> +}; >>>> + >>>> +struct vhost_vring_iotlb_entry { >>>> + unsigned int index; >>>> + __u64 userspace_addr; >>>> +}; >>>> + >>>> struct vhost_memory_region { >>>> __u64 guest_phys_addr; >>>> __u64 memory_size; /* bytes */ >>>> @@ -127,6 +153,15 @@...
2016 Mar 25
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...t_umem_interval_tree_insert(node, &newumem->umem_tree); } if (!memory_access_ok(d, newumem, 0)) @@ -782,6 +842,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) struct vhost_vring_state s; struct vhost_vring_file f; struct vhost_vring_addr a; + struct vhost_vring_iotlb_entry e; u32 idx; long r; @@ -910,6 +971,35 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) } else filep = eventfp; break; + case VHOST_SET_VRING_IOTLB_REQUEST: + r = -EFAULT; + if (copy_from_user(&e, argp, sizeof e)) + break; + if (!access_ok(VERIFY_...
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