search for: vringh_init_iotlb

Displaying 20 results from an estimated 30 matches for "vringh_init_iotlb".

2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...s/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_f...
2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...s/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_f...
2023 Mar 23
1
[PATCH v3 4/8] vringh: support VA with iotlb
...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, bool weak_barriers, > + unsigned int num, bool weak_barriers, bool use_va, > struct vring_desc *desc, > struct vring_avail *avail, >...
2023 Mar 21
1
[PATCH v3 4/8] vringh: support VA with iotlb
...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, bool weak_barriers, + unsigned int num, bool weak_barriers, bool use_va, struct vring_desc *desc, struct vring_avail *avail, struct vring_used *used); diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/driv...
2020 Apr 02
0
[vhost:vhost 22/22] drivers/vdpa/vdpa_sim/vdpa_sim.c:94:8: error: implicit declaration of function 'vringh_init_iotlb'; did you mean 'vringh_init_kern'?
...kindly add following tag Reported-by: kbuild test robot <lkp at intel.com> All errors (new ones prefixed by >>): drivers/vdpa/vdpa_sim/vdpa_sim.c: In function 'vdpasim_queue_ready': >> drivers/vdpa/vdpa_sim/vdpa_sim.c:94:8: error: implicit declaration of function 'vringh_init_iotlb'; did you mean 'vringh_init_kern'? [-Werror=implicit-function-declaration] 94 | ret = vringh_init_iotlb(&vq->vring, vdpasim_features, | ^~~~~~~~~~~~~~~~~ | vringh_init_kern drivers/vdpa/vdpa_sim/vdpa_sim.c: In function 'vdpasim_work...
2020 Apr 02
0
[vhost:vhost 22/22] riscv64-linux-ld: vdpa_sim.c:undefined reference to `vringh_getdesc_iotlb'
...18): undefined reference to `vringh_complete_iotlb' riscv64-linux-ld: vdpa_sim.c:(.text+0x736): undefined reference to `vringh_complete_iotlb' riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_status': vdpa_sim.c:(.text+0xad2): undefined reference to `vringh_init_iotlb' >> riscv64-linux-ld: vdpa_sim.c:(.text+0xb4e): undefined reference to `vringh_init_iotlb' riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_vq_ready': vdpa_sim.c:(.text+0xc6e): undefined reference to `vringh_init_iotlb' riscv64-linux-ld: dr...
2023 Mar 24
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...,10 @@ static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) > { > struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > uint16_t last_avail_idx = vq->vring.last_avail_idx; > + bool va_enabled = use_va && vdpasim->mm_bound; > > - vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, true, false, > + vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, true, > + va_enabled, > (struct vring_desc *)(uintptr_t)vq->desc_addr, > (struct vring_avail *) > (uintptr_t)vq-&gt...
2020 Apr 02
0
[vhost:vhost 22/22] vdpa_sim.c:undefined reference to `vringh_iov_push_iotlb'
...ext+0x496): undefined reference to `vringh_getdesc_iotlb' m68k-linux-ld: vdpa_sim.c:(.text+0x4b0): undefined reference to `vringh_complete_iotlb' m68k-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_status': vdpa_sim.c:(.text+0x764): undefined reference to `vringh_init_iotlb' m68k-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_vq_ready': vdpa_sim.c:(.text+0x844): undefined reference to `vringh_init_iotlb' m68k-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_dev_init': vdpa_sim.c:(.init.text+0xe4): undef...
2020 May 06
0
[PATCH -next] vdpasim: remove unused variable 'ret'
...ivers/vdpa/vdpa_sim/vdpa_sim.c > @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) > static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) > { > struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > - int ret; > > - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, > - VDPASIM_QUEUE_MAX, false, > - (struct vring_desc *)(uintptr_t)vq->desc_addr, > - (struct vring_avail *) > - (uintptr_t)vq->driver_addr, > - (struct vring_used *) > - (uintptr_t)vq->device_addr); > + vringh_init...
2023 Jan 27
0
[PATCH 0/2] Fix expected set_vq_state behavior on vdpa_sim
...nio P?rez wrote: > The use of set_vq_state is to indicate vdpa device the state of a virtqueue. > In the case of split, it means the avail_idx. This is mandatory for use > cases like live migration. > > However, vdpa_sim reset the vq state at vdpasim_queue_ready since it calls > vringh_init_iotlb. > > Also, to starting from an used_idx different than 0 is needed in use cases like > virtual machine migration. Not doing so and letting the caller set an avail > idx different than 0 causes destination device to try to use old buffers that > source driver already recover and are...
2023 Jan 29
0
[PATCH 1/2] vdpa_sim: not reset state in vdpasim_queue_ready
? 2023/1/19 17:14, Eugenio Perez Martin ??: > On Thu, Jan 19, 2023 at 4:16 AM Jason Wang <jasowang at redhat.com> wrote: >> On Thu, Jan 19, 2023 at 12:44 AM Eugenio P?rez <eperezma at redhat.com> wrote: >>> vdpasim_queue_ready calls vringh_init_iotlb, which resets split indexes. >>> But it can be called after setting a ring base with >>> vdpasim_set_vq_state. >>> >>> Fix it by stashing them. They're still resetted in vdpasim_vq_reset. >>> >>> This was discovered and tested live migrating...
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
2020 Apr 29
1
[PATCH] vhost: fix default for vhost_iotlb
...CONFIG_VHOST=m, CONFIG_VHOST_IOTLB=m and CONFIG_VHOST_RING=y, which makes the iotlb implementation left out from vhost_ring, and in turn leads to a link failure of the vdpa_sim module: ERROR: modpost: "vringh_set_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! ERROR: modpost: "vringh_init_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! ERROR: modpost: "vringh_iov_push_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! ERROR: modpost: "vringh_iov_pull_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! ERROR: modpost: "vringh_complete_iotlb" [d...
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
v2: - rebased on Linus' tree, commit ae3419fbac84 ("vc_screen: don't clobber return value in vcs_read") - removed `struct task_struct *owner` param (unused for now, maybe ?useful to support cgroups) [Jason] - add unbind_mm callback [Jason] - call the new unbind_mm callback during the release [Jason] - avoid to call bind_mm callback after the reset, since the device ?is not
2023 Mar 23
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) > { > struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > uint16_t last_avail_idx = vq->vring.last_avail_idx; > + bool va_enabled = use_va && vdpasim->mm_bound; > > - vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, true, false, > + vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, true, > + va_enabled, > (struct vring_desc *)(uintptr_t)vq->desc_addr, >...
2023 Mar 14
1
[PATCH v2 8/8] vdpa_sim: add support for user VA
...vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) > { > struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > uint16_t last_avail_idx = vq->vring.last_avail_idx; > + bool va_enabled = use_va && vdpasim->mm_bound; > > - vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, true, false, > + vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, true, > + va_enabled, > (struct vring_desc *)(uintptr_t)vq->desc_addr, >...
2020 Apr 02
1
[PATCH v2] virtio/test: fix up after IOTLB changes
...r host access. */ @@ -254,6 +256,8 @@ static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val) return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); } +#if IS_REACHABLE(CONFIG_VHOST_IOTLB) + void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb); int vringh_init_iotlb(struct vringh *vrh, u64 features, @@ -284,4 +288,6 @@ void vringh_notify_disable_iotlb(struct vringh *vrh); int vringh_need_notify_iotlb(struct vringh *vrh); +#endif /* CONFIG_VHOST_IOTLB */ + #endif /* _LINUX_VRINGH_H */ diff --git a/tools/virtio/Makefile b/tools/virtio/Makefile index f33f32...
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
2020 Apr 16
0
linux-next: Tree for Apr 15 (vdpa)
...20/4/16 ??12:16, Randy Dunlap wrote: > On 4/14/20 10:22 PM, Stephen Rothwell wrote: >> Hi all, >> >> Changes since 20200414: >> > on x86_64: > > ERROR: modpost: "vringh_set_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! > ERROR: modpost: "vringh_init_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! > ERROR: modpost: "vringh_iov_push_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! > ERROR: modpost: "vringh_iov_pull_iotlb" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! > ERROR: modpost: "vringh_complete...
2023 Mar 31
0
[PATCH v4 5/9] vringh: support VA with iotlb
...gt; vDPA supports the possibility to use user VA in the iotlb messages. >> So, let's add support for user VA in vringh to use it in the vDPA >> simulators. >> >> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> > >... > >> +/** >> + * vringh_init_iotlb_va - initialize a vringh for a ring with IOTLB containing >> + * user VA. >> + * @vrh: the vringh to initialize. >> + * @features: the feature bits for this ring. >> + * @num: the number of elements. >> + * @weak_barriers: true if we only need me...