Re: [PATCH 2/5] iommu/vt-d: Set SNP bit only in second-level page table entries

2022-05-04 Thread Baolu Lu
On 2022/5/4 21:31, Jason Gunthorpe wrote: On Wed, May 04, 2022 at 03:25:50PM +0800, Baolu Lu wrote: Hi Jason, On 2022/5/2 21:05, Jason Gunthorpe wrote: On Sun, May 01, 2022 at 07:24:31PM +0800, Lu Baolu wrote: The SNP bit is only valid for second-level PTEs. Setting this bit in the

Re: [PATCH 2/5] iommu/vt-d: Set SNP bit only in second-level page table entries

2022-05-04 Thread Jason Gunthorpe via iommu
On Wed, May 04, 2022 at 03:25:50PM +0800, Baolu Lu wrote: > Hi Jason, > > On 2022/5/2 21:05, Jason Gunthorpe wrote: > > On Sun, May 01, 2022 at 07:24:31PM +0800, Lu Baolu wrote: > > > The SNP bit is only valid for second-level PTEs. Setting this bit in the > > > first-level PTEs has no functional

Re: [PATCH 2/5] iommu/vt-d: Set SNP bit only in second-level page table entries

2022-05-04 Thread Baolu Lu
Hi Jason, On 2022/5/2 21:05, Jason Gunthorpe wrote: On Sun, May 01, 2022 at 07:24:31PM +0800, Lu Baolu wrote: The SNP bit is only valid for second-level PTEs. Setting this bit in the first-level PTEs has no functional impact because the Intel IOMMU always ignores the same bit in first-level

Re: [PATCH 2/5] iommu/vt-d: Set SNP bit only in second-level page table entries

2022-05-02 Thread Jason Gunthorpe via iommu
On Sun, May 01, 2022 at 07:24:31PM +0800, Lu Baolu wrote: > The SNP bit is only valid for second-level PTEs. Setting this bit in the > first-level PTEs has no functional impact because the Intel IOMMU always > ignores the same bit in first-level PTEs. Anyway, let's check the page > table type

[PATCH 2/5] iommu/vt-d: Set SNP bit only in second-level page table entries

2022-05-01 Thread Lu Baolu
The SNP bit is only valid for second-level PTEs. Setting this bit in the first-level PTEs has no functional impact because the Intel IOMMU always ignores the same bit in first-level PTEs. Anyway, let's check the page table type before setting SNP bit in PTEs to make the code more readable.