From: Eric Auger <eric.auger@redhat.com>
To: peterx@redhat.com, qemu-devel@nongnu.org
Cc: "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 0/4] intel_iommu: Reset vIOMMU after all the rest of devices
Date: Wed, 17 Jan 2024 11:29:08 +0100 [thread overview]
Message-ID: <2cad020f-73b4-48ac-87ab-6ed965fe4cf5@redhat.com> (raw)
In-Reply-To: <20240117091559.144730-1-peterx@redhat.com>
Hi Peter,
On 1/17/24 10:15, peterx@redhat.com wrote:
> From: Peter Xu <peterx@redhat.com>
>
> There're issue reported that when syetem_reset the VM with an intel iommu
system_reset
> device and MT2892 PF(mlx5_core driver), the host kernel throws DMAR error.
>
> https://issues.redhat.com/browse/RHEL-7188
>
> Alex quickly spot a possible issue on ordering of device resets.
>
> It's verified by our QE team then that it is indeed the root cause of the
> problem. Consider when vIOMMU is reset before a VFIO device in a system
> reset: the device can be doing DMAs even if the vIOMMU is gone; in this
> specific context it means the shadow mapping can already be completely
> destroyed. Host will see these DMAs as malicious and report.
That's curious we did not get this earlier?
>
> To fix it, we'll need to make sure all devices under the vIOMMU device
> hierachy will be reset before the vIOMMU itself. There's plenty of trick
> inside, one can get those by reading the last patch.
Not sure what you meant here ;-)
>
> I didn't check other vIOMMUs, but this series should fix the issue for VT-d
> as of now. The solution can be slightly ugly, but a beautiful one can be
> very non-trivial.
>
> Review comments welcomed, thanks.
Thanks
Eric
>
> Peter Xu (4):
> reset: qemu_register_reset_one()
> reset: Allow multiple stages of system resets
> intel_iommu: Tear down address spaces before IOMMU reset
> intel_iommu: Reset vIOMMU at the last stage of system reset
>
> include/sysemu/reset.h | 5 ++++
> hw/core/reset.c | 67 ++++++++++++++++++++++++++++++------------
> hw/i386/intel_iommu.c | 56 +++++++++++++++++++++++++++++++++--
> 3 files changed, 107 insertions(+), 21 deletions(-)
>
next prev parent reply other threads:[~2024-01-17 10:30 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é
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 ` Eric Auger [this message]
2024-01-19 10:46 ` [PATCH 0/4] intel_iommu: Reset vIOMMU after all the rest of devices 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=2cad020f-73b4-48ac-87ab-6ed965fe4cf5@redhat.com \
--to=eric.auger@redhat.com \
--cc=alex.williamson@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).