Re: [PATCH v7 1/7] iommu/vt-d: Don't switch off swiotlb if use direct dma

2019-08-30 Thread Joerg Roedel
On Sat, Aug 24, 2019 at 10:17:30AM +0800, Lu Baolu wrote: > If a system has any external port, through which an untrusted device > might be connected, the external port itself should be marked as an > untrusted device, and all devices beneath it just inherit this > attribution. Okay, makes sense.

Re: [PATCH v7 1/7] iommu/vt-d: Don't switch off swiotlb if use direct dma

2019-08-23 Thread Lu Baolu
Hi Joerg, On 8/23/19 4:39 PM, Joerg Roedel wrote: On Fri, Aug 23, 2019 at 03:17:29PM +0800, Lu Baolu wrote: --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -4569,9 +4569,6 @@ static int __init platform_optin_force_iommu(void) iommu_identity_mapping |= IDEN

Re: [PATCH v7 1/7] iommu/vt-d: Don't switch off swiotlb if use direct dma

2019-08-23 Thread Joerg Roedel
On Fri, Aug 23, 2019 at 03:17:29PM +0800, Lu Baolu wrote: > --- a/drivers/iommu/intel-iommu.c > +++ b/drivers/iommu/intel-iommu.c > @@ -4569,9 +4569,6 @@ static int __init platform_optin_force_iommu(void) > iommu_identity_mapping |= IDENTMAP_ALL; > > dmar_disabled = 0; > -#if

[PATCH v7 1/7] iommu/vt-d: Don't switch off swiotlb if use direct dma

2019-08-23 Thread Lu Baolu
The direct dma implementation depends on swiotlb. Hence, don't switch off swiotlb since direct dma interfaces are used in this driver. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig --- drivers/iommu/Kconfig | 1 + drivers/iommu/intel-