Re: [PATCH v13 3/8] iommu/vt-d: Add nested translation helper function

2020-05-14 Thread Jacob Pan
On Wed, 13 May 2020 22:54:24 -0700 Christoph Hellwig wrote: > > +* 1. CPU vs. IOMMU > > +* 2. Guest vs. Host. > > +*/ > > + switch (addr_width) { > > +#ifdef CONFIG_X86 > > + case ADDR_WIDTH_5LEVEL: > > + if (cpu_feature_enabled(X86_FEATURE_LA57) && > > + c

Re: [PATCH v13 3/8] iommu/vt-d: Add nested translation helper function

2020-05-13 Thread Christoph Hellwig
> + * 1. CPU vs. IOMMU > + * 2. Guest vs. Host. > + */ > + switch (addr_width) { > +#ifdef CONFIG_X86 > + case ADDR_WIDTH_5LEVEL: > + if (cpu_feature_enabled(X86_FEATURE_LA57) && > + cap_5lp_support(iommu->cap)) { > + pasid_set_

[PATCH v13 3/8] iommu/vt-d: Add nested translation helper function

2020-05-13 Thread Jacob Pan
Nested translation mode is supported in VT-d 3.0 Spec.CH 3.8. With PASID granular translation type set to 0x11b, translation result from the first level(FL) also subject to a second level(SL) page table translation. This mode is used for SVA virtualization, where FL performs guest virtual to guest