hw/virtio: Document *_should_notify() are called within rcu_read_lock()
PATCH v2 1/1 hw/virtio: Document *_should_notify() are called within rcu_read_lock()
Such comments make reviewing this file somehow easier.
---
v2: only one space before end of comment (mst)
--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)
hw/virtio/virtio.c +2 -0
@@ -2449,6 +2449,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;
@@ -2485,6 +2486,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;
Signature · 1 line
2.26.3
Le 23/05/2021 à 11:40, Philippe Mathieu-Daudé a écrit :
Quoted 23 lines
Such comments make reviewing this file somehow easier.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: only one space before end of comment (mst)--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)hw/virtio/virtio.c +1
-0@@ -2449,6 +2449,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;
hw/virtio/virtio.c static bool vring_packed_need_event(VirtQueue *vq, bool wrap, · line 2492
Quoted 7 lines
hw/virtio/virtio.c +1
-0@@ -2485,6 +2486,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;
Hi Michael,
Quoted 5 lines · Philippe Mathieu-Daudé
Such comments make reviewing this file somehow easier.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: only one space before end of comment (mst)
Are you OK if this patch is queued via trivial@?
Quoted 25 lines
--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)hw/virtio/virtio.c +2
-0@@ -2449,6 +2449,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;@@ -2485,6 +2486,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;
ping?
Quoted 30 lines · Philippe Mathieu-Daudé
Such comments make reviewing this file somehow easier.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: only one space before end of comment (mst)--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)hw/virtio/virtio.c +2
-0@@ -2449,6 +2449,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;@@ -2485,6 +2486,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;
Hi Michael, since I asked a modification on v1, I suppose this patch is somehow worth in documentation, so I'm pinging again. It could go via qemu-trival if you ack it.
Quoted 34 lines · Philippe Mathieu-Daudé
ping?
Quoted 30 lines · Philippe Mathieu-Daudé
Such comments make reviewing this file somehow easier.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: only one space before end of comment (mst)--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)hw/virtio/virtio.c +2
-0@@ -2449,6 +2449,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;@@ -2485,6 +2486,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;
Laurent Vivier
AppliedLe 06/07/2021 à 12:04, Philippe Mathieu-Daudé a écrit :
Quoted 6 lines
Hi Michael, since I asked a modification on v1, I suppose this patch is somehow worth in documentation, so I'm pinging again. It could go via qemu-trival if you ack it.
Quoted 1 line · Philippe Mathieu-Daudé
ping?
Applied to my trivial-patches branch.
Thanks,
Laurent
Quoted 34 lines
Quoted 32 lines · Philippe Mathieu-Daudé
Quoted 30 lines
Such comments make reviewing this file somehow easier.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: only one space before end of comment (mst)--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)hw/virtio/virtio.c +2
-0@@ -2449,6 +2449,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;@@ -2485,6 +2486,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;