mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Kevin Mitchell <kevmitch@arista.com>
Cc: Vasant Hegde <vasant.hegde@amd.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	stable@vger.kernel.org, "Joerg Roedel (AMD)" <joro@8bytes.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joerg.roedel@amd.com>,
	"open list:AMD IOMMU (AMD-VI)" <iommu@lists.linux.dev>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iommu/amd: allow identity domain during device release
Date: Fri, 9 Oct 2026 17:04:10 -0300	[thread overview]
Message-ID: <20261009200410.GC14213@ziepe.ca> (raw)
In-Reply-To: <20261008202530.14501-2-kevmitch@arista.com>

On Thu, Oct 08, 2026 at 01:25:27PM -0700, Kevin Mitchell wrote:
> @@ -2548,11 +2548,17 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev)
>  	return iommu_dev;
>  }
>  
> +static struct protection_domain identity_domain;
> +
>  static void amd_iommu_release_device(struct device *dev)
>  {
>  	struct iommu_dev_data *dev_data = dev_iommu_priv_get(dev);
>  
> -	WARN_ON(dev_data->domain);
> +	/*
> +	 * Devices with direct mapped regions are attached to the
> +	 * identity_domain as their release_domain.
> +	 */
> +	WARN_ON(dev_data->domain && dev_data->domain != &identity_domain);

At this point I think you can probably just delete this WARN_ON
instead of trying to fiddle it like this.

Ultimately the dev_data->domain should not be set by the identity
domain, Vasant said he was going to work on that clean up..

Jason

      reply	other threads:[~2026-10-09 20:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 20:25 Kevin Mitchell
2026-10-09 20:04 ` Jason Gunthorpe [this message]

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=20261009200410.GC14213@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=iommu@lists.linux.dev \
    --cc=joerg.roedel@amd.com \
    --cc=joro@8bytes.org \
    --cc=kevmitch@arista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=robin.murphy@arm.com \
    --cc=stable@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=vasant.hegde@amd.com \
    --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

all inboxes | Powered by JetHome®