Re: [PATCH v7 9/9] vfio/type1: Handle different mdev isolation type

2019-03-19 Thread Lu Baolu
Hi Neo, On 3/9/19 2:03 AM, Neo Jia wrote: On Thu, Mar 07, 2019 at 04:56:23PM -0700, Alex Williamson wrote: On Thu, 7 Mar 2019 00:44:54 -0800 Neo Jia wrote: On Fri, Feb 22, 2019 at 10:19:27AM +0800, Lu Baolu wrote: This adds the support to determine the isolation type of a mediated device gr

[PATCH 1/2] iommu/vt-d: Check capability before disabling protected memory

2019-03-19 Thread Lu Baolu
The spec states in 10.4.16 that the Protected Memory Enable Register should be treated as read-only for implementations not supporting protected memory regions (PLMR and PHMR fields reported as Clear in the Capability register). Cc: Jacob Pan Cc: mark gross Suggested-by: Ashok Raj Fixes: f8bab7

[PATCH 2/2] iommu/vt-d: Save the right domain ID used by hardware

2019-03-19 Thread Lu Baolu
The driver sets a default domain id (FLPT_DEFAULT_DID) in the first level only pasid entry, but saves a different domain id in @sdev->did. The value saved in @sdev->did will be used to invalidate the translation caches. Hence, the driver might result in invalidating the caches with a wrong domain i

[PATCH 1/1] iommu: Remove iommu_callback_data

2019-03-19 Thread Lu Baolu
The iommu_callback_data is not used anywhere, remove it to make the code more concise. Signed-off-by: Lu Baolu --- drivers/iommu/iommu.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 33a982e33716..1164b9926a2b

Re: [PATCH v2 0/7] iommu/vt-d: Fix-up device-domain relationship by refactoring to use iommu group default domain.

2019-03-19 Thread Lu Baolu
Hi James, On 3/19/19 9:35 PM, James Sewart wrote: Hey Lu, On 15 Mar 2019, at 03:13, Lu Baolu wrote: Hi James, On 3/14/19 7:56 PM, James Sewart wrote: Patches 1 and 2 are the same as v1. v1-v2: Refactored ISA direct mappings to be returned by iommu_get_resv_regions. Integrated patch b

Re: [PATCH v6 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables

2019-03-19 Thread Nicolas Boichat
On Wed, Mar 20, 2019 at 1:56 AM Andrew Morton wrote: > > On Tue, 19 Mar 2019 15:41:43 +0800 Nicolas Boichat > wrote: > > > On Mon, Feb 25, 2019 at 8:23 AM Nicolas Boichat > > wrote: > > > > > > On Thu, Feb 14, 2019 at 1:12 AM Vlastimil Babka wrote: > > > > > > > > On 1/22/19 11:51 PM, Nicolas

Re: [PATCH v6 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables

2019-03-19 Thread Andrew Morton
On Tue, 19 Mar 2019 15:41:43 +0800 Nicolas Boichat wrote: > On Mon, Feb 25, 2019 at 8:23 AM Nicolas Boichat wrote: > > > > On Thu, Feb 14, 2019 at 1:12 AM Vlastimil Babka wrote: > > > > > > On 1/22/19 11:51 PM, Nicolas Boichat wrote: > > > > Hi Andrew, > > > > > > > > On Fri, Jan 11, 2019 at 6

Re: [PATCH v2 RFC/RFT] dma-contiguous: Get normal pages for single-page allocations

2019-03-19 Thread Catalin Marinas
On Tue, Mar 05, 2019 at 10:32:02AM -0800, Nicolin Chen wrote: > The addresses within a single page are always contiguous, so it's > not so necessary to always allocate one single page from CMA area. > Since the CMA area has a limited predefined size of space, it may > run out of space in heavy use

Re: [PATCH v2 0/7] iommu/vt-d: Fix-up device-domain relationship by refactoring to use iommu group default domain.

2019-03-19 Thread James Sewart via iommu
Hey Lu, > On 15 Mar 2019, at 03:13, Lu Baolu wrote: > > Hi James, > > On 3/14/19 7:56 PM, James Sewart wrote: >> Patches 1 and 2 are the same as v1. >> v1-v2: >> Refactored ISA direct mappings to be returned by iommu_get_resv_regions. >> Integrated patch by Lu to defer turning on DMAR until

Re: [PATCH v1 4/9] iommu/vt-d: Add bounce buffer API for domain map/unmap

2019-03-19 Thread Robin Murphy
On 19/03/2019 07:59, Lu Baolu wrote: Hi Christoph, On 3/14/19 12:10 AM, Christoph Hellwig wrote: On Wed, Mar 13, 2019 at 10:31:52AM +0800, Lu Baolu wrote: Hi again, On 3/13/19 10:04 AM, Lu Baolu wrote: Hi, On 3/13/19 12:38 AM, Christoph Hellwig wrote: On Tue, Mar 12, 2019 at 02:00:00PM +08

5.1-rc1: mpt init crash in scsi_map_dma, dma_4v_map_sg on sparc64

2019-03-19 Thread Meelis Roos
Tried 5.1-rc1 on a bunch of sparcs, this hits all my sparcs with sun4v and mpt scsi. [2.733263] Fusion MPT base driver 3.04.20 [2.742995] Copyright (c) 1999-2008 LSI Corporation [2.743052] Fusion MPT SAS Host driver 3.04.20 [2.743881] mptbase: ioc0: Initiating bringup [3.7378

Re: [PATCH v1 4/9] iommu/vt-d: Add bounce buffer API for domain map/unmap

2019-03-19 Thread Lu Baolu
Hi Christoph, On 3/14/19 12:10 AM, Christoph Hellwig wrote: On Wed, Mar 13, 2019 at 10:31:52AM +0800, Lu Baolu wrote: Hi again, On 3/13/19 10:04 AM, Lu Baolu wrote: Hi, On 3/13/19 12:38 AM, Christoph Hellwig wrote: On Tue, Mar 12, 2019 at 02:00:00PM +0800, Lu Baolu wrote: This adds the API

Re: [PATCH v6 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables

2019-03-19 Thread Nicolas Boichat
On Mon, Feb 25, 2019 at 8:23 AM Nicolas Boichat wrote: > > On Thu, Feb 14, 2019 at 1:12 AM Vlastimil Babka wrote: > > > > On 1/22/19 11:51 PM, Nicolas Boichat wrote: > > > Hi Andrew, > > > > > > On Fri, Jan 11, 2019 at 6:21 PM Joerg Roedel wrote: > > >> > > >> On Wed, Jan 02, 2019 at 01:51:45PM