From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: peterx@redhat.com, qemu-devel@nongnu.org
Cc: Eric Auger <eric.auger@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH 3/4] intel_iommu: Tear down address spaces before IOMMU reset
Date: Thu, 18 Jan 2024 09:09:11 +0100 [thread overview]
Message-ID: <8da792b9-f85f-4b2e-b6f6-094c664a953f@linaro.org> (raw)
In-Reply-To: <20240117091559.144730-4-peterx@redhat.com>
Hi Peter,
On 17/1/24 10:15, peterx@redhat.com wrote:
> From: Peter Xu <peterx@redhat.com>
>
> No bug report for this, but logically tearing down of existing address
> space should happen before reset of IOMMU state / registers, because the
> current address spaces may still rely on those information.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> hw/i386/intel_iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 1a07faddb4..8b467cbbd2 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -4090,8 +4090,8 @@ static void vtd_reset(DeviceState *dev)
> {
> IntelIOMMUState *s = INTEL_IOMMU_DEVICE(dev);
>
> - vtd_init(s);
> vtd_address_space_refresh_all(s);
> + vtd_init(s);
> }
You might want to convert to 3-phases reset API here, calling
vtd_address_space_refresh_all() in a ResettableEnterPhase handler
and vtd_init() in ResettableHoldPhase (or ResettableExitPhase?).
next prev parent reply other threads:[~2024-01-18 8:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 9:15 [PATCH 0/4] intel_iommu: Reset vIOMMU after all the rest of devices peterx
2024-01-17 9:15 ` [PATCH 1/4] reset: qemu_register_reset_one() peterx
2024-01-17 10:29 ` Eric Auger
2024-01-17 9:15 ` [PATCH 2/4] reset: Allow multiple stages of system resets peterx
2024-01-17 10:28 ` Eric Auger
2024-01-17 13:58 ` Cédric Le Goater
2024-01-17 17:46 ` Peter Maydell
2024-01-18 15:53 ` Philippe Mathieu-Daudé
2024-01-18 16:15 ` Peter Maydell
2024-01-19 11:10 ` Peter Xu
2024-01-17 9:15 ` [PATCH 3/4] intel_iommu: Tear down address spaces before IOMMU reset peterx
2024-01-17 10:29 ` Eric Auger
2024-01-18 8:09 ` Philippe Mathieu-Daudé [this message]
2024-01-17 9:15 ` [PATCH 4/4] intel_iommu: Reset vIOMMU at the last stage of system reset peterx
2024-01-17 10:38 ` Eric Auger
2024-01-17 10:29 ` [PATCH 0/4] intel_iommu: Reset vIOMMU after all the rest of devices Eric Auger
2024-01-19 10:46 ` Peter Xu
2025-01-23 9:16 ` Eric Auger
2025-01-23 17:57 ` Peter Xu
2025-01-23 18:02 ` Eric Auger
2025-01-29 18:22 ` Eric Auger
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=8da792b9-f85f-4b2e-b6f6-094c664a953f@linaro.org \
--to=philmd@linaro.org \
--cc=alex.williamson@redhat.com \
--cc=eric.auger@redhat.com \
--cc=imammedo@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=peterx@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 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).