hw/virtio: Document *_should_notify() are called within rcu_read_lock()
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Sun, 23 May 2021 09:40:40 +0000 (11:40 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 9 Jul 2021 16:42:46 +0000 (18:42 +0200)
Such comments make reviewing this file somehow easier.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210523094040.3516968-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/virtio/virtio.c

index 6dcf3baf56b79c09528232978ba1a8651329238d..874377f37a70557f8bd86ea0696c2466d2f623ef 100644 (file)
@@ -2447,6 +2447,7 @@ static void virtio_set_isr(VirtIODevice *vdev, int value)
     }
 }
 
+/* Called within rcu_read_lock(). */
 static bool virtio_split_should_notify(VirtIODevice *vdev, VirtQueue *vq)
 {
     uint16_t old, new;
@@ -2483,6 +2484,7 @@ static bool vring_packed_need_event(VirtQueue *vq, bool wrap,
     return vring_need_event(off, new, old);
 }
 
+/* Called within rcu_read_lock(). */
 static bool virtio_packed_should_notify(VirtIODevice *vdev, VirtQueue *vq)
 {
     VRingPackedDescEvent e;