All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Kevin Tian <kevin.tian@intel.com>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] iommu/vt-d: Add support for static identity domain
Date: Wed, 29 Nov 2023 16:28:51 -0400	[thread overview]
Message-ID: <20231129202851.GG436702@nvidia.com> (raw)
In-Reply-To: <20231129202615.GN1312390@ziepe.ca>

On Wed, Nov 29, 2023 at 04:26:15PM -0400, Jason Gunthorpe wrote:
> On Mon, Nov 20, 2023 at 07:29:43PM +0800, Lu Baolu wrote:
> 
> > @@ -2311,6 +2316,13 @@ static int device_def_domain_type(struct device *dev)
> >  			return IOMMU_DOMAIN_IDENTITY;
> >  	}
> >  
> > +	/*
> > +	 * Hardware does not support the passthrough translation mode.
> > +	 * Always use a dynamaic mapping domain.
> > +	 */
> > +	if (!ecap_pass_through(iommu->ecap))
> > +		return IOMMU_DOMAIN_DMA;
> > +
> 
> Doesn't this return from def_domain_type completely prevent using an
> identity domain?
> 
> I thought the point of this was to allow the identity domain but have
> it be translating?

I suppose the answer is the next patch deletes that stuff.

I would probably have structured this in the other order, first add
this hunk and say that old HW is being de-supported. Remove all the
now-dead code creating the 1:1 page table, then refactor the remainder
to create the global static.

Jason

  reply	other threads:[~2023-11-29 20:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 11:29 [PATCH 0/5] iommu/vt-d: Convert to use static identity domain Lu Baolu
2023-11-20 11:29 ` [PATCH 1/5] iommu/vt-d: Setup scalable mode context entry in probe path Lu Baolu
2023-11-20 11:29 ` [PATCH 2/5] iommu/vt-d: Remove scalable mode context entry setup from attach_dev Lu Baolu
2023-11-20 11:29 ` [PATCH 3/5] iommu/vt-d: Refactor domain_context_mapping_one() to be reusable Lu Baolu
2023-11-20 11:29 ` [PATCH 4/5] iommu/vt-d: Add support for static identity domain Lu Baolu
2023-11-29 20:26   ` Jason Gunthorpe
2023-11-29 20:28     ` Jason Gunthorpe [this message]
2023-11-30  6:09       ` Baolu Lu
2023-11-20 11:29 ` [PATCH 5/5] iommu/vt-d: Remove si_domain Lu Baolu

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=20231129202851.GG436702@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.