From: Peter Xu <peterx@redhat.com>
To: "Eugenio Pérez" <eperezma@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
QEMU Stable <qemu-stable@nongnu.org>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] virtio: Add corresponding memory_listener_unregister to unrealize
Date: Fri, 22 Jan 2021 15:17:20 -0500 [thread overview]
Message-ID: <20210122201720.GJ260413@xz-x1> (raw)
In-Reply-To: <20210122200851.345259-1-eperezma@redhat.com>
On Fri, Jan 22, 2021 at 09:08:51PM +0100, Eugenio Pérez wrote:
> Cannot destroy address spaces of IOMMU-aware virtio devices without it,
> since they can contain memory listeners.
>
> Fixes: c611c76417f ("virtio: add MemoryListener to cache ring translations")
> Buglink: https://bugs.launchpad.net/qemu/+bug/1912846
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
> hw/virtio/virtio.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index b308026596..67efd2c301 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -3680,6 +3680,7 @@ static void virtio_device_unrealize(DeviceState *dev)
> VirtIODevice *vdev = VIRTIO_DEVICE(dev);
> VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(dev);
>
> + memory_listener_unregister(&vdev->listener);
> virtio_bus_device_unplugged(vdev);
>
> if (vdc->unrealize != NULL) {
> --
> 2.27.0
>
Reviewed-by: Peter Xu <peterx@redhat.com>
CC stable, assuming that's what we need too.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2021-01-22 20:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 20:08 [PATCH] virtio: Add corresponding memory_listener_unregister to unrealize Eugenio Pérez
2021-01-22 20:17 ` Peter Xu [this message]
2021-01-25 3:15 ` Jason Wang
2021-01-25 16:55 ` Eugenio Perez Martin
2021-01-25 17:18 ` Peter Xu
2021-01-25 19:22 ` 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=20210122201720.GJ260413@xz-x1 \
--to=peterx@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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).