Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Dmitry Malkin <dma@nebius.com>
Cc: Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>,
	Nicolin Chen <nicolinc@nvidia.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [RFC PATCH] iommu/arm-smmu-v3: Allow nested attach for PCI bridges without vDEVICE
Date: Fri, 14 Aug 2026 14:48:25 -0300	[thread overview]
Message-ID: <20260814174825.GC510472@nvidia.com> (raw)
In-Reply-To: <PA1P190MB25578C482C8A3B06A4DCC6FDDBDA2@PA1P190MB2557.EURP190.PROD.OUTLOOK.COM>

On Fri, Aug 14, 2026 at 10:07:09AM +0000, Dmitry Malkin wrote:
> IOMMU groups can contain passed-through endpoints and host PCI bridges.
> QEMU creates vDEVICEs for the endpoints, but not for bridges that are
> not visible to the guest.

But why exactly do you have pci bridges in your groups? That isn't
entirely normal?

> Since f0ea207ed781 ("iommu/arm-smmu-v3: Introduce struct
> arm_smmu_vmaster"), group-wide translated-domain attachment therefore
> fails when the first bridge is visited:
> 
>   pcieport 0009:00:00.0:
>     missing vDEVICE association for translated nested domain:
>     cfg=5 ret=-2
> 
>   vfio-pci 0009:03:00.0:
>     VFIO_DEVICE_ATTACH_IOMMUFD_PT attach failed for pt_id 19: -ENOENT
> 
> The same configuration worked with Linux 6.14.

Hmm, but without a viommu we shouldn't have this vmaster stuff
activating in the first place, I thought? 

+               if (new_domain->type == IOMMU_DOMAIN_NESTED) {
+                       ret = arm_smmu_attach_prepare_vmaster(
+                               state, to_smmu_nested_domain(new_domain));

That should only be happening if the VMM is setting up vIOMMU.

And vIOMMU wasn't supported in 6.14, so if it "worked" the VMM was
doing something quite different - not seeing this as a regression

If viommu should support multi-device groups, I'm not sure. I want to
know why you even have multi-device groups in the first place because
that is not normal at all.

Jason


  parent reply	other threads:[~2026-08-14 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 10:07 [RFC PATCH] iommu/arm-smmu-v3: Allow nested attach for PCI bridges without vDEVICE Dmitry Malkin
2026-08-14 14:15 ` Pranjal Shrivastava
2026-08-14 15:40   ` Dmitry Malkin
2026-08-14 17:49   ` Jason Gunthorpe
2026-08-14 17:48 ` Jason Gunthorpe [this message]
2026-08-14 18:56   ` Dmitry Malkin
2026-08-14 22:11     ` Jason Gunthorpe

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=20260814174825.GC510472@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dma@nebius.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=regressions@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --cc=stable@vger.kernel.org \
    --cc=will@kernel.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