mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: baolu.lu@linux.intel.com, 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: Thu, 30 Nov 2023 14:09:52 +0800	[thread overview]
Message-ID: <1af87099-ad52-4b34-a87c-f12925903a15@linux.intel.com> (raw)
In-Reply-To: <20231129202851.GG436702@nvidia.com>

On 2023/11/30 4:28, Jason Gunthorpe wrote:
> 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.

Okay, that would be more readable.

Best regards,
baolu

  reply	other threads:[~2023-11-30  6:09 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 " 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
2023-11-30  6:09       ` Baolu Lu [this message]
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=1af87099-ad52-4b34-a87c-f12925903a15@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --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 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®