From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, thuth@redhat.com
Subject: [PATCH 2/4] virtio-mmio: stop ioeventfd on legacy reset
Date: Thu, 9 Jun 2022 11:15:32 +0200 [thread overview]
Message-ID: <20220609091534.1416909-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20220609091534.1416909-1-pbonzini@redhat.com>
If the queue PFN is set to zero on a virtio-mmio device, the device is reset.
In that case however the virtio_bus_stop_ioeventfd function was not
called; add it so that the behavior is similar to when status is set to 0.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/virtio/virtio-mmio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 688eccda94..41a35d31c8 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -376,6 +376,7 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
return;
}
if (value == 0) {
+ virtio_mmio_stop_ioeventfd(proxy);
virtio_reset(vdev);
} else {
virtio_queue_set_addr(vdev, vdev->queue_sel,
--
2.36.1
next prev parent reply other threads:[~2022-06-09 11:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 9:15 [PATCH 0/4] virtio: various cleanups to reset code Paolo Bonzini
2022-06-09 9:15 ` [PATCH 1/4] s390x: simplify virtio_ccw_reset_virtio Paolo Bonzini
2022-06-09 11:40 ` Cornelia Huck
2022-06-09 9:15 ` Paolo Bonzini [this message]
2022-06-09 11:49 ` [PATCH 2/4] virtio-mmio: stop ioeventfd on legacy reset Cornelia Huck
2022-06-09 9:15 ` [PATCH 3/4] virtio: stop ioeventfd on reset Paolo Bonzini
2022-06-09 11:56 ` Cornelia Huck
2022-06-09 9:15 ` [PATCH 4/4] virtio-mmio: cleanup reset Paolo Bonzini
2022-06-09 12:22 ` Cornelia Huck
2022-06-09 14:44 ` Paolo Bonzini
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=20220609091534.1416909-3-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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).