Re: [RFC PATCH 6/6] iommu/arm-smmu-v3: Avoid ILLEGAL setting of STE.S1STALLD and CD.S

2017-09-13 Thread Will Deacon
On Wed, Sep 13, 2017 at 06:11:13PM +0800, Yisheng Xie wrote: > On 2017/9/13 11:06, Will Deacon wrote: > > On Tue, Sep 05, 2017 at 01:54:19PM +0100, Jean-Philippe Brucker wrote: > >> On 31/08/17 09:20, Yisheng Xie wrote: > >>> It is ILLEGAL to set STE.S1STALLD if STALL_MODEL is not 0b00, which >

Re: [RFC PATCH 6/6] iommu/arm-smmu-v3: Avoid ILLEGAL setting of STE.S1STALLD and CD.S

2017-09-13 Thread Jean-Philippe Brucker
On 13/09/17 11:11, Yisheng Xie wrote: > Hi Will, > > On 2017/9/13 11:06, Will Deacon wrote: >> On Tue, Sep 05, 2017 at 01:54:19PM +0100, Jean-Philippe Brucker wrote: >>> On 31/08/17 09:20, Yisheng Xie wrote: It is ILLEGAL to set STE.S1STALLD if STALL_MODEL is not 0b00, which means we

Re: [PATCH 3/4] iommu/arm-smmu: Disable stalling faults for all endpoints

2017-09-13 Thread Rob Clark
On Fri, Dec 16, 2016 at 6:54 AM, Will Deacon wrote: > Hi Rob, > > On Tue, Dec 06, 2016 at 06:30:21PM -0500, Rob Clark wrote: >> On Thu, Aug 18, 2016 at 9:05 AM, Will Deacon wrote: >> > Enabling stalling faults can result in hardware deadlock on poorly >>

Re: VFIO on ARM64

2017-09-13 Thread valmiki
On 9/13/2017 6:50 AM, Jean-Philippe Brucker wrote: Hi Valmiki, On 12/09/17 19:01, valmiki wrote: Hi, as per VFIO documentation i see that we need to see "/sys/bus/pci/devices/:06:0d.0/iommu_group" in order to find group in which PCI bus is attached. But as per drivers/pci/pci-sysfs.c in

Re: VFIO on ARM64

2017-09-13 Thread Jean-Philippe Brucker
On 13/09/17 18:38, valmiki wrote: > On 9/13/2017 6:50 AM, Jean-Philippe Brucker wrote: >> Hi Valmiki, >> >> On 12/09/17 19:01, valmiki wrote: >>> Hi, as per VFIO documentation i see that we need to see >>> "/sys/bus/pci/devices/:06:0d.0/iommu_group" in order to find group >>> in which PCI bus

[patch 45/52] iommu/vt-d: Reevaluate vector configuration on activate()

2017-09-13 Thread Thomas Gleixner
With the upcoming reservation/management scheme, early activation will assign a special vector. The final activation at request_irq() assigns a real vector, which needs to be updated in the tables. Split out the reconfiguration code in set_affinity and use it for reactivation. Signed-off-by:

[patch 46/52] iommu/amd: Reevaluate vector configuration on activate()

2017-09-13 Thread Thomas Gleixner
With the upcoming reservation/management scheme, early activation will assign a special vector. The final activation at request_irq() assigns a real vector, which needs to be updated in the tables. Split out the reconfiguration code in set_affinity and use it for reactivation. Signed-off-by:

[PATCH] iommu/arm-smmu-v3: Avoid ILLEGAL setting of STE.S1STALLD

2017-09-13 Thread Yisheng Xie
According to Spec, it is ILLEGAL to set STE.S1STALLD if STALL_MODEL is not 0b00, which means we should not disable stall mode if stall or terminate mode is not configuable. As Jean-Philippe's suggestion, this patch introduce a feature bit ARM_SMMU_FEAT_STALL_FORCE, which means smmu only supports

Re: [PATCH v2 1/1] iommu/arm-smmu: Defer TLB flush in case of unmap op

2017-09-13 Thread Vivek Gautam
Hi, On 09/06/2017 11:07 AM, Vivek Gautam wrote: We don't want to touch the TLB when smmu is suspended, so defer the TLB maintenance until smmu is resumed. On resume, we issue arm_smmu_device_reset() to restore the configuration and flush the TLBs. Signed-off-by: Vivek Gautam

Re: [RFC PATCH 6/6] iommu/arm-smmu-v3: Avoid ILLEGAL setting of STE.S1STALLD and CD.S

2017-09-13 Thread Yisheng Xie
Hi Will, On 2017/9/13 11:06, Will Deacon wrote: > On Tue, Sep 05, 2017 at 01:54:19PM +0100, Jean-Philippe Brucker wrote: >> On 31/08/17 09:20, Yisheng Xie wrote: >>> It is ILLEGAL to set STE.S1STALLD if STALL_MODEL is not 0b00, which >>> means we should not disable stall mode if stall/terminate