mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: 70sp <70sp@protonmail.com>
Cc: "iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>
Subject: Re: [REGRESSION] GPU passes into VM improperly after c376a3456d8b or a98db518dde2
Date: Sun, 24 May 2026 11:24:35 +0800	[thread overview]
Message-ID: <7ec374cb-9a0a-4e30-8410-3a028e46cacd@linux.intel.com> (raw)
In-Reply-To: <d6a7f70c-5a8a-4be6-abdd-5b3decbb602a@linux.intel.com>

On 4/27/2026 3:15 PM, Baolu Lu wrote:
> On 4/14/26 17:22, 70sp wrote:
>> I can confirm, that the "domain is not compatible with device" message 
>> is nowhere to be seen.
>>
>> I have double checked by also adding an else statement with a 
>> different message and that one showed up several times. (by pci (iGPU) 
>> 0000:00:02.0, pcieport 0000:00:01.0 and vfio-pci (GTX 970) 
>> 0000:01:00.0, 0000:01:00.1). ret = 0.
>>
> 
> Hmm, it seems the domain is compatible with the device hardware and was
> attached successfully. Perhaps you can try to check the differences
> between these two domain attachments by dumping the root, context, and
> PASID table entries and comparing the configurations of the success and
> failure cases.
> 
> To do this, simply apply the change below with CONFIG_DMAR_DEBUG
> enabled:
> 
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 4d0e65bc131d..bf303cfcf2ee 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -1345,6 +1345,9 @@ static int dmar_domain_attach_device(struct 
> dmar_domain *domain,
>          if (ret)
>                  goto out_block_translation;
> 
> +       dmar_fault_dump_ptes(iommu, PCI_DEVID(info->bus, info->devfn),
> +                            0, IOMMU_NO_PASID);
> +
>          return 0;
> 
>   out_block_translation:

Have you tried this patch? It dumps the context and PASID table entries
after a domain is attached to the device. Hopefully, you can find some
clues by comparing the good and bad kernels.

Thanks,
baolu

  parent reply	other threads:[~2026-05-24  3:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <z7Rkts0EsooZcnCjNfJaK6ursftFU8ubOkH0hcNjzxugEAwGsHLMblOdfoAx-gJzBZ-TMmeUtD7iWBngbFY5UCJCwdSmYqmCVMy-yhbirUk=@protonmail.com>
2026-04-13  6:47 ` Baolu Lu
2026-04-14  9:22   ` 70sp
2026-04-23  9:25     ` 70sp
2026-04-27  7:15     ` Baolu Lu
2026-04-29 20:30       ` 70sp
2026-05-13  6:50         ` Thorsten Leemhuis
2026-05-22 20:10           ` 70sp
2026-05-24  3:24       ` Baolu Lu [this message]
2026-05-25 19:57         ` 70sp
2026-05-28  6:09           ` Baolu Lu
2026-07-15 21:20             ` 70sp
2026-04-12 11:25 70sp

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=7ec374cb-9a0a-4e30-8410-3a028e46cacd@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=70sp@protonmail.com \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    /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

Powered by JetHome