iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Robin Murphy <robin.murphy@arm.com>,
	linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org
Subject: Re: [PATCH 02/13] iommu: amd: Prepare for generic IO page table framework
Date: Fri, 25 Sep 2020 16:58:53 +0700	[thread overview]
Message-ID: <af467992-8b37-0900-a0cf-cbfbfc948d0d@amd.com> (raw)
In-Reply-To: <a2e28845-d162-281a-c762-698d1750bbea@arm.com>

Robin,

On 9/24/20 7:25 PM, Robin Murphy wrote:
>> +struct io_pgtable_ops *amd_iommu_setup_io_pgtable_ops(struct iommu_dev_data *dev_data,
>> +                         struct protection_domain *domain)
>> +{
>> +        domain->iop.pgtbl_cfg = (struct io_pgtable_cfg) {
>> +        .pgsize_bitmap    = AMD_IOMMU_PGSIZES,
>> +        .ias        = IOMMU_IN_ADDR_BIT_SIZE,
>> +        .oas        = IOMMU_OUT_ADDR_BIT_SIZE,
>> +        .coherent_walk    = false,
> 
> Is that right? Given that you seem to use regular kernel addresses for pagetable pages and don't have any obvious cache 
> maintenance around PTE manipulation, I suspect not ;)
> > It's fair enough if your implementation doesn't use this and simply assumes coherency, but in that case it would be less
> confusing to have the driver set it to true for the sake of honesty, or just leave it out 
> entirely - explicitly setting false gives the illusion of being meaningful.

AMD IOMMU can be configured to disable snoop for page table walk of a particular device (DTE[SD]=1). However, the 
current Linux driver does not set this bit, which should assume coherency. We can just leaving this out for now. I can 
remove this when I send out V2 along w/ other changes.

> Otherwise, the io-pgtable parts all look OK to me - it's nice to finally 
> fulfil the original intent of not being an Arm-specific thing :D
> 
> Robin.

Thanks,
Suravee
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-09-25  9:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 10:14 [PATCH 00/13] iommu: amd: Add Generic IO Page Table Framework Support Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 01/13] iommu: amd: Re-define amd_iommu_domain_encode_pgtable as inline Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 02/13] iommu: amd: Prepare for generic IO page table framework Suravee Suthikulpanit
2020-09-24 12:25   ` Robin Murphy
2020-09-25  9:58     ` Suravee Suthikulpanit [this message]
2020-09-23 10:14 ` [PATCH 03/13] iommu: amd: Move pt_root to to struct amd_io_pgtable Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 04/13] iommu: amd: Convert to using amd_io_pgtable Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 05/13] iommu: amd: Declare functions as extern Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 06/13] iommu: amd: Move IO page table related functions Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 07/13] iommu: amd: Restructure code for freeing page table Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 08/13] iommu: amd: Remove amd_iommu_domain_get_pgtable Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 09/13] iommu: amd: Rename variables to be consistent with struct io_pgtable_ops Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 10/13] iommu: amd: Refactor fetch_pte to use struct amd_io_pgtable Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 11/13] iommu: amd: Introduce iommu_v1_iova_to_phys Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 12/13] iommu: amd: Introduce iommu_v1_map_page and iommu_v1_unmap_page Suravee Suthikulpanit
2020-09-23 10:14 ` [PATCH 13/13] iommu: amd: Adopt IO page table framework Suravee Suthikulpanit
2020-09-24 10:34 ` [PATCH 00/13] iommu: amd: Add Generic IO Page Table Framework Support Joerg Roedel
2020-09-24 10:50   ` Suravee Suthikulpanit
2020-10-01 12:59     ` Joerg Roedel
2020-10-01 14:51       ` Suravee Suthikulpanit
2020-10-01 14:55         ` Joerg Roedel

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=af467992-8b37-0900-a0cf-cbfbfc948d0d@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).