From: "Cédric Le Goater" <clg@redhat.com>
To: Eric Auger <eric.auger@redhat.com>,
eric.auger.pro@gmail.com, qemu-devel@nongnu.org,
qemu-arm@nongnu.org, mst@redhat.com, jean-philippe@linaro.org,
peter.maydell@linaro.org, yanghliu@redhat.com,
zhenzhong.duan@intel.com, alex.williamson@redhat.com
Subject: Re: [PATCH 7/7] virtio-iommu: Revert transient enablement of IOMMU MR in bypass mode
Date: Wed, 26 Jun 2024 19:10:33 +0200 [thread overview]
Message-ID: <21eaa3bf-5f54-4bd6-919b-a245b425e7ac@redhat.com> (raw)
In-Reply-To: <20240626082727.1278530-8-eric.auger@redhat.com>
On 6/26/24 10:26 AM, Eric Auger wrote:
> In 94df5b2180d6 ("virtio-iommu: Fix 64kB host page size VFIO device
> assignment"), in case of bypass mode, we transiently enabled the
> IOMMU MR to allow the set_page_size_mask() to be called and pass
> information about the page size mask constraint of cold plugged
> VFIO devices. Now we do not use the IOMMU MR callback anymore, we
> can just get rid of this hack.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/virtio/virtio-iommu.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
> index b24e10de81..f87359b3e7 100644
> --- a/hw/virtio/virtio-iommu.c
> +++ b/hw/virtio/virtio-iommu.c
> @@ -1385,18 +1385,6 @@ static void virtio_iommu_freeze_granule(Notifier *notifier, void *data)
> VirtIOIOMMU *s = container_of(notifier, VirtIOIOMMU, machine_done);
> int granule;
>
> - if (likely(s->config.bypass)) {
> - /*
> - * Transient IOMMU MR enable to collect page_size_mask requirements
> - * through memory_region_iommu_set_page_size_mask() called by
> - * VFIO region_add() callback
> - */
> - s->config.bypass = false;
> - virtio_iommu_switch_address_space_all(s);
> - /* restore default */
> - s->config.bypass = true;
> - virtio_iommu_switch_address_space_all(s);
> - }
> s->granule_frozen = true;
> granule = ctz64(s->config.page_size_mask);
> trace_virtio_iommu_freeze_granule(BIT_ULL(granule));
next prev parent reply other threads:[~2024-06-26 17:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 8:26 [PATCH 0/7] VIRTIO-IOMMU/HostIOMMUDevice: Fixes and page size mask rework Eric Auger
2024-06-26 8:26 ` [PATCH 1/7] virtio-iommu: Fix error handling in virtio_iommu_set_host_iova_ranges() Eric Auger
2024-06-26 10:39 ` Cédric Le Goater
2024-06-26 8:26 ` [PATCH 2/7] vfio-container-base: Introduce vfio_container_get_iova_ranges() helper Eric Auger
2024-06-26 12:42 ` Cédric Le Goater
2024-06-26 8:26 ` [PATCH 3/7] HostIOMMUDevice : remove Error handle from get_iova_ranges callback Eric Auger
2024-06-26 12:43 ` Cédric Le Goater
2024-06-26 8:26 ` [PATCH 4/7] HostIOMMUDevice: Introduce get_page_size_mask() callback Eric Auger
2024-06-26 12:44 ` Cédric Le Goater
2024-06-27 3:06 ` Duan, Zhenzhong
2024-06-27 8:59 ` Eric Auger
2024-06-27 11:25 ` Duan, Zhenzhong
2024-06-26 8:26 ` [PATCH 5/7] virtio-iommu : Retrieve page size mask on virtio_iommu_set_iommu_device() Eric Auger
2024-06-27 11:32 ` Duan, Zhenzhong
2024-06-27 13:57 ` Eric Auger
2024-06-26 8:26 ` [PATCH 6/7] memory: remove IOMMU MR iommu_set_page_size_mask() callback Eric Auger
2024-06-26 16:56 ` Cédric Le Goater
2024-06-26 8:26 ` [PATCH 7/7] virtio-iommu: Revert transient enablement of IOMMU MR in bypass mode Eric Auger
2024-06-26 17:10 ` Cédric Le Goater [this message]
2024-07-01 20:07 ` [PATCH 0/7] VIRTIO-IOMMU/HostIOMMUDevice: Fixes and page size mask rework Michael S. Tsirkin
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=21eaa3bf-5f54-4bd6-919b-a245b425e7ac@redhat.com \
--to=clg@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=eric.auger@redhat.com \
--cc=jean-philippe@linaro.org \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=yanghliu@redhat.com \
--cc=zhenzhong.duan@intel.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).