search for: use_va

Displaying 14 results from an estimated 14 matches for "use_va".

2023 Mar 24
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
? 2023/3/21 23:48, Stefano Garzarella ??: > The new "use_va" module parameter (default: true) is used in > vdpa_alloc_device() to inform the vDPA framework that the device > supports VA. > > vringh is initialized to use VA only when "use_va" is true and the > user's mm has been bound. So, only when the bus supports user VA...
2023 Mar 14
1
[PATCH v2 8/8] vdpa_sim: add support for user VA
On Thu, Mar 2, 2023 at 7:35?PM Stefano Garzarella <sgarzare at redhat.com> wrote: > > The new "use_va" module parameter (default: false) is used in > vdpa_alloc_device() to inform the vDPA framework that the device > supports VA. > > vringh is initialized to use VA only when "use_va" is true and the > user's mm has been bound. So, only when the bus supports user VA...
2023 Mar 21
1
[PATCH v3 4/8] vringh: support VA with iotlb
...s(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index 1991a02c6431..d39b9f2dcba0 100644 --- a/include/linux/vringh.h +++ b/include/linux/vringh.h @@ -32,6 +32,9 @@ struct vringh { /* Can we get away with weak barriers? */ bool weak_barriers; + /* Use user's VA */ + bool use_va; + /* Last available index we saw (ie. where we're up to). */ u16 last_avail_idx; @@ -279,7 +282,7 @@ void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, spinlock_t *iotlb_lock); int vringh_init_iotlb(struct vringh *vrh, u64 features, - unsigned int num...
2023 Mar 23
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
On Tue, Mar 21, 2023 at 11:48?PM Stefano Garzarella <sgarzare at redhat.com> wrote: > > The new "use_va" module parameter (default: true) is used in > vdpa_alloc_device() to inform the vDPA framework that the device > supports VA. > > vringh is initialized to use VA only when "use_va" is true and the > user's mm has been bound. So, only when the bus supports user VA...
2023 Mar 23
1
[PATCH v3 4/8] vringh: support VA with iotlb
...> index 1991a02c6431..d39b9f2dcba0 100644 > --- a/include/linux/vringh.h > +++ b/include/linux/vringh.h > @@ -32,6 +32,9 @@ struct vringh { > /* Can we get away with weak barriers? */ > bool weak_barriers; > > + /* Use user's VA */ > + bool use_va; > + > /* Last available index we saw (ie. where we're up to). */ > u16 last_avail_idx; > > @@ -279,7 +282,7 @@ void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, > spinlock_t *iotlb_lock); > > int vringh_init_iotl...
2023 Mar 21
1
[PATCH v3 2/8] vhost-vdpa: use bind_mm/unbind_mm device callbacks
When the user call VHOST_SET_OWNER ioctl and the vDPA device has `use_va` set to true, let's call the bind_mm callback. In this way we can bind the device to the user address space and directly use the user VA. The unbind_mm callback is called during the release after stopping the device. Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- Notes:...
2023 Mar 23
1
[PATCH v3 2/8] vhost-vdpa: use bind_mm/unbind_mm device callbacks
On Tue, Mar 21, 2023 at 11:42?PM Stefano Garzarella <sgarzare at redhat.com> wrote: > > When the user call VHOST_SET_OWNER ioctl and the vDPA device > has `use_va` set to true, let's call the bind_mm callback. > In this way we can bind the device to the user address space > and directly use the user VA. > > The unbind_mm callback is called during the release after > stopping the device. > > Signed-off-by: Stefano Garzarella <sgarz...
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
...t now during the reset - added new patch replace kmap_atomic() with kmap_local_page() since ?checkpatch.pl complained about deprecation of kmap_atomic() touched ?by a patch in this series - fix cast warnings when build with W=1 C=1 - added new patch to replace the spinlock with a mutex [Jason] - `use_va` set to true by default [Eugenio] - supported the new unbind_mm callback [Jason] - removed the unbind_mm call in vdpasim_do_reset() [Jason] - avoided to release the lock while call kthread_flush_work() since ?we are now using a mutex to protect the device state RFC v1: https://lore.kernel.org/lkm...
2023 Apr 04
9
[PATCH v5 0/9] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
2023 Mar 23
2
[PATCH v3 8/8] vdpa_sim: add support for user VA
On Thu, Mar 23, 2023 at 11:42:07AM +0800, Jason Wang wrote: >On Tue, Mar 21, 2023 at 11:48?PM Stefano Garzarella <sgarzare at redhat.com> wrote: >> >> The new "use_va" module parameter (default: true) is used in >> vdpa_alloc_device() to inform the vDPA framework that the device >> supports VA. >> >> vringh is initialized to use VA only when "use_va" is true and the >> user's mm has been bound. So, only when the b...
2023 Mar 21
5
[PATCH v3 0/8] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
2023 Mar 24
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...at 5:50?PM Stefano Garzarella <sgarzare at redhat.com> wrote: >> >> On Thu, Mar 23, 2023 at 11:42:07AM +0800, Jason Wang wrote: >> >On Tue, Mar 21, 2023 at 11:48?PM Stefano Garzarella <sgarzare at redhat.com> wrote: >> >> >> >> The new "use_va" module parameter (default: true) is used in >> >> vdpa_alloc_device() to inform the vDPA framework that the device >> >> supports VA. >> >> >> >> vringh is initialized to use VA only when "use_va" is true and the >> >> user...
2023 Mar 21
3
[PATCH v3 5/8] vdpa_sim: make devices agnostic for work management
Let's move work management inside the vdpa_sim core. This way we can easily change how we manage the works, without having to change the devices each time. Acked-by: Eugenio P??rez Martin <eperezma at redhat.com> Acked-by: Jason Wang <jasowang at redhat.com> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vdpa/vdpa_sim/vdpa_sim.h | 3 ++-
2023 Jan 24
0
[RFC PATCH 02/19] drivers/vhost: Convert to use vm_account
.../vdpa.c > index ec32f78..a31dd53 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c ... > @@ -780,6 +780,10 @@ static int vhost_vdpa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, > u32 asid = iotlb_to_asid(iotlb); > int r = 0; > > + if (!vdpa->use_va) > + if (vm_account_pinned(&dev->vm_account, PFN_DOWN(size))) > + return -ENOMEM; > + > r = vhost_iotlb_add_range_ctx(iotlb, iova, iova + size - 1, > pa, perm, opaque); > if (r) I suspect some error handling will have to be reworked then, no? > -- &g...