From: Jason Wang <jasowang@redhat.com>
To: Eric Auger <eric.auger@redhat.com>,
eric.auger.pro@gmail.com, qemu-devel@nongnu.org,
qemu-arm@nongnu.org, peter.maydell@linaro.org, mst@redhat.com,
alex.williamson@redhat.com, eperezma@redhat.com,
jean-philippe@linaro.org, david@gibson.dropbear.id.au,
groug@kaod.org
Cc: peterx@redhat.com
Subject: Re: [PATCH 1/2] vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier
Date: Wed, 10 Feb 2021 16:10:51 +0800 [thread overview]
Message-ID: <09d20dd5-fa58-b34a-094d-2de89654fa37@redhat.com> (raw)
In-Reply-To: <20210209213233.40985-2-eric.auger@redhat.com>
On 2021/2/10 上午5:32, Eric Auger wrote:
> In an attempt to fix smmu/virtio-iommu - vhost regression, commit
> 958ec334bca3 ("vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support")
> broke virtio-iommu integration. This is due to the fact VFIO registers
> IOMMU_NOTIFIER_ALL notifiers, which includes IOMMU_NOTIFIER_DEVIOTLB_UNMAP
> and this latter now is rejected by the virtio-iommu. As a consequence,
> the registration fails. VHOST behaves like a device with an ATC cache. The
> VFIO device does not support this scheme yet.
>
> Let's register only legacy MAP and UNMAP notifiers.
>
> Fixes: 958ec334bca3 ("vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support")
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> ---
> hw/vfio/common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> index 6ff1daa763..a50b10c801 100644
> --- a/hw/vfio/common.c
> +++ b/hw/vfio/common.c
> @@ -787,7 +787,7 @@ static void vfio_listener_region_add(MemoryListener *listener,
> iommu_idx = memory_region_iommu_attrs_to_index(iommu_mr,
> MEMTXATTRS_UNSPECIFIED);
> iommu_notifier_init(&giommu->n, vfio_iommu_map_notify,
> - IOMMU_NOTIFIER_ALL,
> + IOMMU_NOTIFIER_IOTLB_EVENTS,
> section->offset_within_region,
> int128_get64(llend),
> iommu_idx);
Acked-by: Jason Wang <jasowang@redhat.com>
next prev parent reply other threads:[~2021-02-10 8:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 21:32 [PATCH 0/2] Additional vIOMMU fixes related to UNMAP notifiers Eric Auger
2021-02-09 21:32 ` [PATCH 1/2] vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier Eric Auger
2021-02-10 8:10 ` Jason Wang [this message]
2021-02-11 20:19 ` Alex Williamson
2021-02-09 21:32 ` [PATCH 2/2] spapr_iommu: Fix vhost integration regression Eric Auger
2021-02-10 0:05 ` David Gibson
2021-02-10 8:11 ` Jason Wang
2021-02-10 8:12 ` Michael S. Tsirkin
2021-02-10 8:19 ` Greg Kurz
2021-02-09 22:23 ` [PATCH 0/2] Additional vIOMMU fixes related to UNMAP notifiers Peter Xu
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=09d20dd5-fa58-b34a-094d-2de89654fa37@redhat.com \
--to=jasowang@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=eperezma@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=eric.auger@redhat.com \
--cc=groug@kaod.org \
--cc=jean-philippe@linaro.org \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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).