All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eric Auger <eric.auger@redhat.com>, Jason Wang <jasowang@redhat.com>
Subject: [PULL 04/10] vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier
Date: Tue, 16 Mar 2021 11:06:46 -0600	[thread overview]
Message-ID: <161591440654.135549.253333162470895031.stgit@rhel8vm.home.shazbot.org> (raw)
In-Reply-To: <161591414009.135549.5804863877511053803.stgit@rhel8vm.home.shazbot.org>

From: Eric Auger <eric.auger@redhat.com>

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>
Message-Id: <20210209213233.40985-2-eric.auger@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@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 d360d6f2da14..35a41fd05251 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);




  parent reply	other threads:[~2021-03-16 17:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 17:06 [PULL 00/10] VFIO updates for QEMU 6.0 Alex Williamson
2021-03-16 17:06 ` [PULL 01/10] vfio: Fix vfio_listener_log_sync function name typo Alex Williamson
2021-03-16 17:06 ` [PULL 02/10] hw/vfio/pci-quirks: Replace the word 'blacklist' Alex Williamson
2021-03-16 17:06 ` [PULL 03/10] MAINTAINERS: Cover docs/igd-assign.txt in VFIO section Alex Williamson
2021-03-16 17:06 ` Alex Williamson [this message]
2021-03-16 17:06 ` [PULL 05/10] spapr_iommu: Fix vhost integration regression Alex Williamson
2021-03-16 17:07 ` [PULL 06/10] vfio: Move the saving of the config space to the right place in VFIO migration Alex Williamson
2021-03-16 17:07 ` [PULL 07/10] vfio: Set the priority of the VFIO VM state change handler explicitly Alex Williamson
2021-03-16 17:07 ` [PULL 08/10] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration Alex Williamson
2021-03-16 17:07 ` [PULL 09/10] vfio: Support host translation granule size Alex Williamson
2021-03-16 17:07 ` [PULL 10/10] vfio/migrate: Move switch of dirty tracking into vfio_memory_listener Alex Williamson
2021-03-17 21:00 ` [PULL 00/10] VFIO updates for QEMU 6.0 Peter Maydell
     [not found] <161550593889.21070.5662039089881992714.stgit@gimli.home>
2021-03-11 23:43 ` [PULL 04/10] vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier Alex Williamson

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=161591440654.135549.253333162470895031.stgit@rhel8vm.home.shazbot.org \
    --to=alex.williamson@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=jasowang@redhat.com \
    --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 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.