search for: vdpasim_set_vq_st

Displaying 19 results from an estimated 19 matches for "vdpasim_set_vq_st".

Did you mean: vdpasim_set_vq_cb
2023 Jan 29
1
[PATCH v3 2/2] vdpasim: support doorbell mapping
...free_page(vdpasim->notify); > } > > static const struct vdpa_config_ops vdpasim_config_ops = { > @@ -704,6 +765,8 @@ static const struct vdpa_config_ops vdpasim_config_ops = { > .get_vq_ready = vdpasim_get_vq_ready, > .set_vq_state = vdpasim_set_vq_state, > .get_vq_state = vdpasim_get_vq_state, > + .get_vq_notification = vdpasim_get_vq_notification, > + .get_vq_notification_pgprot = vdpasim_get_vq_notification_pgprot, > .get_vq_align = vdpasim_get_vq_align, > .get_vq_group...
2023 Mar 02
1
[PATCH v2 7/8] vdpa_sim: replace the spinlock with a mutex to protect the state
...ready; vq->ready = ready; if (vq->ready && !old_ready) { vdpasim_queue_ready(vdpasim, idx); } - spin_unlock(&vdpasim->lock); + mutex_unlock(&vdpasim->mutex); } static bool vdpasim_get_vq_ready(struct vdpa_device *vdpa, u16 idx) @@ -299,9 +299,9 @@ static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; struct vringh *vrh = &vq->vring; - spin_lock(&vdpasim->lock); + mutex_lock(&vdpasim->mutex); vrh->last_avail_idx = state->split.avail_index; - spin_unlock(&vdpasim-...
2023 Jan 29
0
[PATCH 1/2] vdpa_sim: not reset state in vdpasim_queue_ready
...ang <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 the vdpa_sim_net device. >>> >>> Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") >>...
2023 Feb 28
0
[PATCH v2] vdpa_sim: set last_used_idx as last_avail_idx in vdpasim_queue_ready
...gt; >Since vdpa_sim does not support receive inflight descriptors as a >destination of a migration, let's set both avail_idx and used_idx the >same at vq start. This is how vhost-user works in a >VHOST_SET_VRING_BASE call. > >Although the simple fix is to set last_used_idx at vdpasim_set_vq_state, >it would be reset at vdpasim_queue_ready. The last_avail_idx case is >fixed with commit a09f493c ("vdpa_sim: not reset state in >vdpasim_queue_ready"). Since the only option is to make it equal to >last_avail_idx, adding the only change needed here. > >This was di...
2020 Jul 21
0
[PATCH V2 vhost next 06/10] vdpa: Modify get_vq_state() to return error code
...ate(struct vdpa_device *vdpa_dev, u16 qid, > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c > index 599519039f8d..ddf6086d43c2 100644 > --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c > @@ -427,14 +427,15 @@ static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, > return 0; > } > > -static void vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx, > - struct vdpa_vq_state *state) > +static int vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx, > + struct vdpa_vq_state *state)...
2020 Aug 05
0
[PATCH V4 linux-next 08/12] vdpa: Modify get_vq_state() to return error code
...ate(struct vdpa_device *vdpa_dev, u16 qid, > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c > index f1c351d5959b..c68741363643 100644 > --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c > @@ -464,14 +464,15 @@ static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, > return 0; > } > > -static void vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx, > - struct vdpa_vq_state *state) > +static int vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx, > + struct vdpa_vq_state *state)...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...vdpasim_queue_ready(vdpasim, idx); + spin_unlock(&vdpasim->lock); +} + +static bool vdpasim_get_vq_ready(struct vdpa_device *vdpa, u16 idx) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; + + return vq->ready; +} + +static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, u64 state) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; + struct vringh *vrh = &vq->vring; + + spin_lock(&vdpasim->lock); + vrh->last_avail_idx = state; + spin_unlock(&vdpasim...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...vdpasim_queue_ready(vdpasim, idx); + spin_unlock(&vdpasim->lock); +} + +static bool vdpasim_get_vq_ready(struct vdpa_device *vdpa, u16 idx) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; + + return vq->ready; +} + +static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, u64 state) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; + struct vringh *vrh = &vq->vring; + + spin_lock(&vdpasim->lock); + vrh->last_avail_idx = state; + spin_unlock(&vdpasim...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...vdpasim->lock); > +} > + > +static bool vdpasim_get_vq_ready(struct vdpa_device *vdpa, u16 idx) > +{ > + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > + > + return vq->ready; > +} > + > +static int vdpasim_set_vq_state(struct vdpa_device *vdpa, u16 idx, u64 state) > +{ > + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > + struct vringh *vrh = &vq->vring; > + > + spin_lock(&vdpasim->lock); > + vrh->last_avail_idx...
2020 Jul 01
5
[PATCH 0/5]
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 designed 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 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
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 ++-
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all: This is an updated version of kernel support for vDPA device. Various changes were made based on the feedback since last verion. One major change is to drop the sysfs API and leave the management interface for future development, and introudce the incremental DMA bus operations. Please see changelog for more information. The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is
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 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 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single