From: "Eugenio Pérez" <eperezma@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	qemu-block@nongnu.org, "Amit Shah" <amit@kernel.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Fam Zheng" <fam@euphon.net>
Subject: [PATCH v6 8/9] virtio: add some rcu comments
Date: Thu, 24 Oct 2019 19:14:05 +0200	[thread overview]
Message-ID: <20191024171406.12504-9-eperezma@redhat.com> (raw)
In-Reply-To: <20191024171406.12504-1-eperezma@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 hw/virtio/virtio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 3cf12a62c0..9195b08da8 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -278,6 +278,7 @@ static void vring_packed_flags_write(VirtIODevice *vdev,
     address_space_cache_invalidate(cache, off, sizeof(flags));
 }
 
+/* Called within rcu_read_lock().  */
 static VRingMemoryRegionCaches *vring_get_region_caches(struct VirtQueue *vq)
 {
     VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches);
@@ -721,7 +722,6 @@ bool virtqueue_rewind(VirtQueue *vq, unsigned int num)
     return true;
 }
 
-/* Called within rcu_read_lock().  */
 static void virtqueue_split_fill(VirtQueue *vq, const VirtQueueElement *elem,
                     unsigned int len, unsigned int idx)
 {
@@ -780,6 +780,7 @@ static void virtqueue_packed_fill_desc(VirtQueue *vq,
     vring_packed_desc_write(vq->vdev, &desc, &caches->desc, head, strict_order);
 }
 
+/* Called within rcu_read_lock().  */
 void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
                     unsigned int len, unsigned int idx)
 {
-- 
2.16.5
next prev parent reply	other threads:[~2019-10-24 17:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 17:13 [PATCH v6 0/9] Packed virtqueue for virtio Eugenio Pérez
2019-10-24 17:13 ` [PATCH v6 1/9] virtio: basic structure for packed ring Eugenio Pérez
2019-10-24 17:13 ` [PATCH v6 2/9] virtio: device/driver area size calculation refactor for split ring Eugenio Pérez
2019-10-24 17:14 ` [PATCH v6 3/9] virtio: Free rng and blk virqueues Eugenio Pérez
2019-10-24 17:14 ` [PATCH v6 4/9] virtio: basic packed virtqueue support Eugenio Pérez
2019-10-24 17:14 ` [PATCH v6 5/9] virtio: event suppression support for packed ring Eugenio Pérez
2019-10-24 17:14 ` [PATCH v6 6/9] vhost_net: enable packed ring support Eugenio Pérez
2019-10-24 17:14 ` [PATCH v6 7/9] virtio: add property to enable packed virtqueue Eugenio Pérez
2019-10-24 17:14 ` Eugenio Pérez [this message]
2019-10-24 17:14 ` [PATCH v6 9/9] virtio: Move vdev->broken check to dispatch drop_all Eugenio Pérez
2019-10-25  3:20 ` [PATCH v6 0/9] Packed virtqueue for virtio Jason Wang
2019-10-25  7:04   ` Eugenio Perez Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=20191024171406.12504-9-eperezma@redhat.com \
    --to=eperezma@redhat.com \
    --cc=amit@kernel.org \
    --cc=fam@euphon.net \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).