* [PATCH] hw/virtio: Document *_should_notify() are called within rcu_read_lock()
@ 2021-05-20 6:49 Philippe Mathieu-Daudé
2021-05-23 8:02 ` Michael S. Tsirkin
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-20 6:49 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Philippe Mathieu-Daudé, Michael S. Tsirkin
Such comments make reviewing this file somehow easier.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/virtio/virtio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index e02544b2df7..2b4c6c4b875 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -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;
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hw/virtio: Document *_should_notify() are called within rcu_read_lock()
2021-05-20 6:49 [PATCH] hw/virtio: Document *_should_notify() are called within rcu_read_lock() Philippe Mathieu-Daudé
@ 2021-05-23 8:02 ` Michael S. Tsirkin
0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2021-05-23 8:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-trivial, qemu-devel
On Thu, May 20, 2021 at 08:49:00AM +0200, Philippe Mathieu-Daudé wrote:
> Such comments make reviewing this file somehow easier.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ok but
> ---
> hw/virtio/virtio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index e02544b2df7..2b4c6c4b875 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -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;
one space before */ please, not two.
> --
> 2.26.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-23 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 6:49 [PATCH] hw/virtio: Document *_should_notify() are called within rcu_read_lock() Philippe Mathieu-Daudé
2021-05-23 8:02 ` Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.