From: Baolu Lu <baolu.lu@linux.intel.com>
To: Jerry Snitselaar <jsnitsel@redhat.com>,
Joerg Roedel <joro@8bytes.org>,
iommu@lists.linux.dev
Cc: baolu.lu@linux.intel.com
Subject: Re: Question on context setup for passthrough
Date: Fri, 21 Feb 2025 16:40:42 +0800 [thread overview]
Message-ID: <75f4867f-99b9-4ba9-abf4-f0dc29d08fca@linux.intel.com> (raw)
In-Reply-To: <rz4kc2zxi4fritsbmjsa3ekqncguvnmeir5se3fhu7pzhtgipk@2u6ps3q3gsqz>
On 2025/2/21 15:16, Jerry Snitselaar wrote:
> Hi Baolu,
Hi Jerry,
>
> In context_setup_pass_through_cb there is a check that bails out
> if dev != &pdev->dev which doesn't exist in the code that sets up the
> context entries in the dma domain case. Is there a reason this check is
> done in the passthrough case?
The check "dev != &pdev->dev" was added to prevent setting a context for
a different device that has its own probe path.
> I've been looking at an issue where a vm is running with an
> intel-iommu device, and has a pcie-to-pci bridge with a device behind
> it. When running with this commit, and defaulting to passthrough it
> gets a DMAR fault for the present bit not being set in the context
> entry when the device is coming up, and the rid for the fault is the
> rid the bridge will use for transactions coming from the secondary bus.
> Without that check the context entry gets set up for that rid, and
> it doesn't get the DMAR fault.
This appears to be a bug. Do you have a fix, or can you tell me the
process I can use to reproduce this issue with a local setup?
Thanks,
baolu
next prev parent reply other threads:[~2025-02-21 8:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 2:27 [PATCH 00/14] [PULL REQUEST] Intel IOMMU updates for v6.12 Lu Baolu
2024-09-02 2:27 ` [PATCH 01/14] iommu/vt-d: Require DMA domain if hardware not support passthrough Lu Baolu
2024-09-02 2:27 ` [PATCH 02/14] iommu/vt-d: Remove identity mappings from si_domain Lu Baolu
2024-09-02 2:27 ` [PATCH 03/14] iommu/vt-d: Always reserve a domain ID for identity setup Lu Baolu
2024-09-02 2:27 ` [PATCH 04/14] iommu/vt-d: Remove has_iotlb_device flag Lu Baolu
2024-09-02 2:27 ` [PATCH 05/14] iommu/vt-d: Factor out helpers from domain_context_mapping_one() Lu Baolu
2024-09-02 2:27 ` [PATCH 06/14] iommu/vt-d: Add support for static identity domain Lu Baolu
2025-02-21 7:16 ` Question on context setup for passthrough Jerry Snitselaar
2025-02-21 8:40 ` Baolu Lu [this message]
2025-02-21 10:07 ` Jerry Snitselaar
2025-02-21 18:26 ` Jerry Snitselaar
2025-02-23 14:24 ` Baolu Lu
2024-09-02 2:27 ` [PATCH 07/14] iommu/vt-d: Cleanup si_domain Lu Baolu
2024-09-02 2:27 ` [PATCH 08/14] iommu/vt-d: Fix potential lockup if qi_submit_sync called with 0 count Lu Baolu
2024-09-02 2:27 ` [PATCH 09/14] iommu/vt-d: Move PCI PASID enablement to probe path Lu Baolu
2024-09-02 2:27 ` [PATCH 10/14] iommu/vt-d: Unconditionally flush device TLB for pasid table updates Lu Baolu
2024-09-02 2:27 ` [PATCH 11/14] iommu/vt-d: Factor out invalidation descriptor composition Lu Baolu
2024-09-02 2:27 ` [PATCH 12/14] iommu/vt-d: Refactor IOTLB and Dev-IOTLB flush for batching Lu Baolu
2024-09-02 2:27 ` [PATCH 13/14] iommu/vt-d: Add qi_batch for dmar_domain Lu Baolu
2024-09-02 2:27 ` [PATCH 14/14] iommu/vt-d: Introduce batched cache invalidation Lu Baolu
2024-09-02 16:15 ` [PATCH 00/14] [PULL REQUEST] Intel IOMMU updates for v6.12 Joerg Roedel
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=75f4867f-99b9-4ba9-abf4-f0dc29d08fca@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=jsnitsel@redhat.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