diff options
author | Jason Wang <jasowang@redhat.com> | 2022-12-21 14:21:46 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-02-20 19:26:57 -0500 |
commit | 2f8200efe7300190ad88d8238b119c098b6544bd (patch) | |
tree | f6bd5a0d38f10313229d923edb464308c24a2d61 /drivers/vdpa/vdpa_sim/vdpa_sim.c | |
parent | 07b679f70d73483930e8d3c293942416d9cd5c13 (diff) | |
download | lwn-2f8200efe7300190ad88d8238b119c098b6544bd.tar.gz lwn-2f8200efe7300190ad88d8238b119c098b6544bd.zip |
vdpa_sim: use weak barriers
vDPA simulators are software emulated device, so let's switch to use
weak barriers to avoid extra overhead in the driver.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221221062146.15356-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Diffstat (limited to 'drivers/vdpa/vdpa_sim/vdpa_sim.c')
-rw-r--r-- | drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index fb9000131ac0..88eab8ded751 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -68,7 +68,7 @@ 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; - vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, false, + vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, true, (struct vring_desc *)(uintptr_t)vq->desc_addr, (struct vring_avail *) (uintptr_t)vq->driver_addr, |