search for: vdpasim_reset

Displaying 18 results from an estimated 18 matches for "vdpasim_reset".

2020 May 14
2
[PATCH] vdpa_sim: do not reset IOTLB during device reset
...ers/vdpa/vdpa_sim/vdpa_sim.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 7957d2d41fc4..cc5525743a25 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -119,8 +119,6 @@ static void vdpasim_reset(struct vdpasim *vdpasim) for (i = 0; i < VDPASIM_VQ_NUM; i++) vdpasim_vq_reset(&vdpasim->vqs[i]); - vhost_iotlb_reset(vdpasim->iommu); - vdpasim->features = 0; vdpasim->status = 0; ++vdpasim->generation; -- 2.20.1
2020 May 14
2
[PATCH] vdpa_sim: do not reset IOTLB during device reset
...ers/vdpa/vdpa_sim/vdpa_sim.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 7957d2d41fc4..cc5525743a25 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -119,8 +119,6 @@ static void vdpasim_reset(struct vdpasim *vdpasim) for (i = 0; i < VDPASIM_VQ_NUM; i++) vdpasim_vq_reset(&vdpasim->vqs[i]); - vhost_iotlb_reset(vdpasim->iommu); - vdpasim->features = 0; vdpasim->status = 0; ++vdpasim->generation; -- 2.20.1
2023 Mar 02
1
[PATCH v2 7/8] vdpa_sim: replace the spinlock with a mutex to protect the state
...set_status(struct vdpa_device *vdpa, u8 status) { struct vdpasim *vdpasim = vdpa_to_sim(vdpa); - spin_lock(&vdpasim->lock); + mutex_lock(&vdpasim->mutex); vdpasim->status = status; - spin_unlock(&vdpasim->lock); + mutex_unlock(&vdpasim->mutex); } static int vdpasim_reset(struct vdpa_device *vdpa) { struct vdpasim *vdpasim = vdpa_to_sim(vdpa); - spin_lock(&vdpasim->lock); + mutex_lock(&vdpasim->mutex); vdpasim->status = 0; vdpasim_do_reset(vdpasim); - spin_unlock(&vdpasim->lock); + mutex_unlock(&vdpasim->mutex); return 0;...
2020 May 14
0
[PATCH] vdpa_sim: do not reset IOTLB during device reset
...> 1 file changed, 2 deletions(-) > > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c > index 7957d2d41fc4..cc5525743a25 100644 > --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c > @@ -119,8 +119,6 @@ static void vdpasim_reset(struct vdpasim *vdpasim) > for (i = 0; i < VDPASIM_VQ_NUM; i++) > vdpasim_vq_reset(&vdpasim->vqs[i]); > > - vhost_iotlb_reset(vdpasim->iommu); > - > vdpasim->features = 0; > vdpasim->status = 0; > ++vdpasim->generation; > -- > 2.20.1
2020 Jul 31
0
[PATCH] vdpasim: protect concurrent access to iommu iotlb
.../drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -70,6 +70,8 @@ struct vdpasim { u32 status; u32 generation; u64 features; + /* spinlock to synchronize iommu table */ + spinlock_t iommu_lock; }; static struct vdpasim *vdpasim_dev; @@ -118,7 +120,9 @@ static void vdpasim_reset(struct vdpasim *vdpasim) for (i = 0; i < VDPASIM_VQ_NUM; i++) vdpasim_vq_reset(&vdpasim->vqs[i]); + spin_lock(&vdpasim->iommu_lock); vhost_iotlb_reset(vdpasim->iommu); + spin_unlock(&vdpasim->iommu_lock); vdpasim->features = 0; vdpasim->status = 0; @@...
2023 Jan 29
1
[PATCH v3 2/2] vdpasim: support doorbell mapping
...lock(&vdpasim->lock); > + if (!started && (status & VIRTIO_CONFIG_S_DRIVER_OK)) > + schedule_delayed_work(&vdpasim->notify_work, > + msecs_to_jiffies(VDPASIM_VRING_POLL_PERIOD)); > } > > static int vdpasim_reset(struct vdpa_device *vdpa) > { > struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > > + cancel_delayed_work_sync(&vdpasim->notify_work); Do we need to do this after setting running to zero? Otherwise it's racy. Thanks > spin_lock(&vdpasim->lock)...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...vq_reset(struct vdpasim_virtqueue *vq) +{ + vq->ready = 0; + vq->desc_addr = 0; + vq->driver_addr = 0; + vq->device_addr = 0; + vq->cb = NULL; + vq->private = NULL; + vringh_init_iotlb(&vq->vring, vdpasim_features, VDPASIM_QUEUE_MAX, + false, 0, 0, 0); +} + +static void vdpasim_reset(struct vdpasim *vdpasim) +{ + int i; + + for (i = 0; i < VDPASIM_VQ_NUM; i++) + vdpasim_vq_reset(&vdpasim->vqs[i]); + + vhost_iotlb_reset(vdpasim->iommu); + + vdpasim->features = 0; + vdpasim->status = 0; + ++vdpasim->generation; +} + +static void vdpasim_work(struct work_str...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...vq_reset(struct vdpasim_virtqueue *vq) +{ + vq->ready = 0; + vq->desc_addr = 0; + vq->driver_addr = 0; + vq->device_addr = 0; + vq->cb = NULL; + vq->private = NULL; + vringh_init_iotlb(&vq->vring, vdpasim_features, VDPASIM_QUEUE_MAX, + false, 0, 0, 0); +} + +static void vdpasim_reset(struct vdpasim *vdpasim) +{ + int i; + + for (i = 0; i < VDPASIM_VQ_NUM; i++) + vdpasim_vq_reset(&vdpasim->vqs[i]); + + vhost_iotlb_reset(vdpasim->iommu); + + vdpasim->features = 0; + vdpasim->status = 0; + ++vdpasim->generation; +} + +static void vdpasim_work(struct work_str...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...;ready = 0; > + vq->desc_addr = 0; > + vq->driver_addr = 0; > + vq->device_addr = 0; > + vq->cb = NULL; > + vq->private = NULL; > + vringh_init_iotlb(&vq->vring, vdpasim_features, VDPASIM_QUEUE_MAX, > + false, 0, 0, 0); > +} > + > +static void vdpasim_reset(struct vdpasim *vdpasim) > +{ > + int i; > + > + for (i = 0; i < VDPASIM_VQ_NUM; i++) > + vdpasim_vq_reset(&vdpasim->vqs[i]); > + > + vhost_iotlb_reset(vdpasim->iommu); > + > + vdpasim->features = 0; > + vdpasim->status = 0; > + ++vdpasim->gen...
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'?
...112 false, NULL, NULL, NULL); a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 113 } a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 114 a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 115 static void vdpasim_reset(struct vdpasim *vdpasim) a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 116 { a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 117 int i; a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 118 a35630af6f3198...
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