Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU

2022-05-18 Thread Baolu Lu
On 2022/5/17 19:13, Jason Gunthorpe wrote: On Tue, May 17, 2022 at 10:05:43AM +0800, Baolu Lu wrote: Hi Jason, On 2022/5/17 02:06, Jason Gunthorpe wrote: +static __init int tboot_force_iommu(void) +{ + if (!tboot_enabled()) + return 0; + + if (no_iommu || dmar_disable

Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU

2022-05-17 Thread Jason Gunthorpe via iommu
On Tue, May 17, 2022 at 10:05:43AM +0800, Baolu Lu wrote: > Hi Jason, > > On 2022/5/17 02:06, Jason Gunthorpe wrote: > > > +static __init int tboot_force_iommu(void) > > > +{ > > > + if (!tboot_enabled()) > > > + return 0; > > > + > > > + if (no_iommu || dmar_disabled) > > > + pr_w

Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU

2022-05-16 Thread Baolu Lu
Hi Jason, On 2022/5/17 02:06, Jason Gunthorpe wrote: +static __init int tboot_force_iommu(void) +{ + if (!tboot_enabled()) + return 0; + + if (no_iommu || dmar_disabled) + pr_warn("Forcing Intel-IOMMU to enabled\n"); Unrelated, but when we are in the spec

Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU

2022-05-16 Thread Jacob Pan
Hi Jason, On Mon, 16 May 2022 15:06:28 -0300, Jason Gunthorpe wrote: > Unrelated, but when we are in the special secure IOMMU modes, do we > force ATS off? Specifically does the IOMMU reject TLPs that are marked > as translated? Yes, VT-d context entry has a Device TLB Enable bit, if 0, it means

Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU

2022-05-16 Thread Jason Gunthorpe via iommu
On Sat, May 14, 2022 at 09:43:21AM +0800, Lu Baolu wrote: > tboot_force_iommu() is only called by the Intel IOMMU driver. Move the > helper into that driver. No functional change intended. > > Signed-off-by: Lu Baolu > --- > include/linux/tboot.h | 2 -- > arch/x86/kernel/tboot.c | 15

[PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU

2022-05-13 Thread Lu Baolu
tboot_force_iommu() is only called by the Intel IOMMU driver. Move the helper into that driver. No functional change intended. Signed-off-by: Lu Baolu --- include/linux/tboot.h | 2 -- arch/x86/kernel/tboot.c | 15 --- drivers/iommu/intel/iommu.c | 14 ++ 3 fil