[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v3 4/4] drivers/virtio: Memory barrier before notifying host on virtqueue updates
Hello Simon, This patch seems fine. Reviewed-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> Thanks & Regards Sharan On 1/31/19 1:04 AM, Simon Kuenzer wrote: Before notifying the virtio backend on the host we should make sure that the virtqueue index update operation actually happened. Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> --- plat/drivers/include/virtio/virtqueue.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plat/drivers/include/virtio/virtqueue.h b/plat/drivers/include/virtio/virtqueue.h index a4181f57..f8b36348 100644 --- a/plat/drivers/include/virtio/virtqueue.h +++ b/plat/drivers/include/virtio/virtqueue.h @@ -233,6 +233,13 @@ static inline void virtqueue_host_notify(struct virtqueue *vq) { UK_ASSERT(vq);+ /*+ * Before notifying the virtio backend on the host we should make sure + * that the virtqueue index update operation happened. Note that this + * function is declared as inline. + */ + mb(); + if (vq->vq_notify_host && virtqueue_notify_enabled(vq)) { uk_pr_debug("notify queue %d\n", vq->queue_id); vq->vq_notify_host(vq->vdev, vq->queue_id); _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |