Re: [PATCH v2] iommu/amd: Enforce 4k mapping for certain IOMMU data structures

2020-11-23 Thread Will Deacon
On Thu, Nov 19, 2020 at 10:19:01PM -0600, Brijesh Singh wrote: > On 11/19/20 8:30 PM, Suravee Suthikulpanit wrote: > > On 11/18/20 5:57 AM, Will Deacon wrote: > > > I think I'm missing something here. set_memory_4k() will break the > > kernel > > > linear mapping up into page granular mappings,

Re: [PATCH v2] iommu/amd: Enforce 4k mapping for certain IOMMU data structures

2020-11-19 Thread Brijesh Singh
On 11/19/20 8:30 PM, Suravee Suthikulpanit wrote: > Will, > > To answer your questions from v1 thread. > > On 11/18/20 5:57 AM, Will Deacon wrote: > > On 11/5/20 9:58 PM, Suravee Suthikulpanit wrote: > >> AMD IOMMU requires 4k-aligned pages for the event log, the PPR log, > >> and the completion

Re: [PATCH v2] iommu/amd: Enforce 4k mapping for certain IOMMU data structures

2020-11-19 Thread Suravee Suthikulpanit
Will, To answer your questions from v1 thread. On 11/18/20 5:57 AM, Will Deacon wrote: > On 11/5/20 9:58 PM, Suravee Suthikulpanit wrote: >> AMD IOMMU requires 4k-aligned pages for the event log, the PPR log, >> and the completion wait write-back regions. However, when allocating >> the pages,

[PATCH v2] iommu/amd: Enforce 4k mapping for certain IOMMU data structures

2020-11-05 Thread Suravee Suthikulpanit
AMD IOMMU requires 4k-aligned pages for the event log, the PPR log, and the completion wait write-back regions. However, when allocating the pages, they could be part of large mapping (e.g. 2M) page. This causes #PF due to the SNP RMP hardware enforces the check based on the page level for these