RE: [PATCH 7/7] vfio pci: Add vfio iommu implementation for FSL_PAMU

2013-09-25 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, September 26, 2013 12:37 AM > To: Bhushan Bharat-R65777 > Cc: j...@8bytes.org; b...@kernel.crashing.org; ga...@kernel.crashing.org; > linux- > ker...@vger.kernel.org; linuxppc-...@lists.ozl

RE: [PATCH 6/7] vfio: moving some functions in common file

2013-09-25 Thread Bhushan Bharat-R65777
> -Original Message- > From: linux-pci-ow...@vger.kernel.org [mailto:linux-pci-ow...@vger.kernel.org] > On Behalf Of Alex Williamson > Sent: Wednesday, September 25, 2013 10:33 PM > To: Bhushan Bharat-R65777 > Cc: j...@8bytes.org; b...@kernel.crashing.org; ga...@kernel.crashing.org; > li

RE: [PATCH 5/7] iommu: supress loff_t compilation error on powerpc

2013-09-25 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, September 25, 2013 10:10 PM > To: Bhushan Bharat-R65777 > Cc: j...@8bytes.org; b...@kernel.crashing.org; ga...@kernel.crashing.org; > linux- > ker...@vger.kernel.org; linuxppc-...@lists.oz

Re: [PATCH 1/1] x86/iommu: correct ICS register offset

2013-09-25 Thread Li, Zhen-Hua
Joerg, Thank you for reviewing this patch. ZhenHua On 09/24/2013 07:05 PM, Joerg Roedel wrote: On Tue, Sep 17, 2013 at 04:38:29PM +0800, ZhenHua wrote: Hi Guys, Though DMAR_ICS_REG is not used yet, I think this patch is necessary. So please take a look at it. You are right, my Spec

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 23:15 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 15:46 -0600, Alex Williamson wrote: > > On Wed, 2013-09-25 at 21:11 +0100, David Woodhouse wrote: > > > I wouldn't bother to go looking for opportunities to use super pages if > > > we remove the last non-SP-capable I

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 15:46 -0600, Alex Williamson wrote: > On Wed, 2013-09-25 at 21:11 +0100, David Woodhouse wrote: > > I wouldn't bother to go looking for opportunities to use super pages if > > we remove the last non-SP-capable IOMMU from the domain. > > I predict bugs getting filed if a guest

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 21:11 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 13:44 -0600, Alex Williamson wrote: > > On Wed, 2013-09-25 at 19:52 +0100, David Woodhouse wrote: > > > On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > > > > On Wed, 2013-09-25 at 17:05 +0100, David Woodho

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 13:44 -0600, Alex Williamson wrote: > On Wed, 2013-09-25 at 19:52 +0100, David Woodhouse wrote: > > On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > > > On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > > > > Why would it ever care? If it *happens* to map

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 19:52 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > > On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > > > Why would it ever care? If it *happens* to map something that can use > > > large pages, yay!. If it subsequently

Re: [PATCH 7/7] vfio pci: Add vfio iommu implementation for FSL_PAMU

2013-09-25 Thread Alex Williamson
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > This patch adds vfio iommu support for Freescale IOMMU > (PAMU - Peripheral Access Management Unit). > > The Freescale PAMU is an aperture-based IOMMU with the following > characteristics. Each device has an entry in a table in memory > d

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > > Why would it ever care? If it *happens* to map something that can use > > large pages, yay!. If it subsequently breaks apart those large pages by > > unmapping 4KiB in the middl

Re: [PATCH 7/7] iommu/arm-smmu: Clear global and context bank fault status and syndrome registers

2013-09-25 Thread Andreas Herrmann
On Wed, Sep 25, 2013 at 12:49:18PM -0400, Will Deacon wrote: > On Tue, Sep 24, 2013 at 07:32:47PM +0100, Andreas Herrmann wrote: > > On Tue, Sep 24, 2013 at 11:42:52AM -0400, Will Deacon wrote: > > > On Tue, Sep 24, 2013 at 04:07:01PM +0100, Andreas Herrmann wrote: > > > > Signed-off-by: Andreas He

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > > On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > > > I *hate* the bizarre calling convention for iommu_unmap(). Is it > > > actually clearly documented anywhere?

Re: [PATCH 6/7] vfio: moving some functions in common file

2013-09-25 Thread Alex Williamson
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > Some function defined in vfio_iommu_type1.c were common and > we want to use these for FSL IOMMU (PAMU) and iommu-none driver. > So some of them are moved to vfio_iommu_common.c > > I think we can do more of that but we will take this step

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Joerg Roedel
On Wed, Sep 25, 2013 at 05:05:13PM +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > > Yeah, I agree that this should be documented since it is quite > > non-standard/non-obvious behaviour of a function. The reason the > > interface was implemented this way is

Re: [PATCH 2/7] iommu/arm-smmu: Calculate SMMU_CB_BASE from smmu register values

2013-09-25 Thread Will Deacon
On Tue, Sep 24, 2013 at 07:07:20PM +0100, Andreas Herrmann wrote: > On Tue, Sep 24, 2013 at 11:34:57AM -0400, Will Deacon wrote: > > On Tue, Sep 24, 2013 at 04:06:56PM +0100, Andreas Herrmann wrote: > > > Currently it is derived from smmu resource size. If the resource size > > > is wrongly specifi

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > > I *hate* the bizarre calling convention for iommu_unmap(). Is it > > actually clearly documented anywhere? Why on earth is it not just > > returning void, and expected to un

Re: [PATCH 7/7] iommu/arm-smmu: Clear global and context bank fault status and syndrome registers

2013-09-25 Thread Will Deacon
On Tue, Sep 24, 2013 at 07:32:47PM +0100, Andreas Herrmann wrote: > On Tue, Sep 24, 2013 at 11:42:52AM -0400, Will Deacon wrote: > > On Tue, Sep 24, 2013 at 04:07:01PM +0100, Andreas Herrmann wrote: > > > Signed-off-by: Andreas Herrmann > > > --- > > > drivers/iommu/arm-smmu.c |9 + >

Re: [PATCH 2/7] iommu: add api to get iommu_domain of a device

2013-09-25 Thread Alex Williamson
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > This api return the iommu domain to which the device is attached. > The iommu_domain is required for making API calls related to iommu. > Follow up patches which use this API to know iommu maping. > > Signed-off-by: Bharat Bhushan > --- >

Re: [PATCH 5/7] iommu: supress loff_t compilation error on powerpc

2013-09-25 Thread Alex Williamson
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > Signed-off-by: Bharat Bhushan > --- > drivers/vfio/pci/vfio_pci_rdwr.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c > b/drivers/vfio/pci/vfio_pci_rdwr.c > index 210db24

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > > I *hate* the bizarre calling convention for iommu_unmap(). Is it > > actually clearly documented anywhere? Why on earth is it not just > > returning void, and expected to un

Re: [PATCH 6/7] iommu/arm-smmu: Add module parameter arm-smmu=off|force_isolation

2013-09-25 Thread Joerg Roedel
On Tue, Sep 24, 2013 at 04:42:18PM +0100, Will Deacon wrote: > On Tue, Sep 24, 2013 at 04:07:00PM +0100, Andreas Herrmann wrote: > > +__setup("arm-smmu", arm_smmu_parse_options); > > If this is going to be a common function for IOMMUs, let's instead move the > command-line parsing out into the gen

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Joerg Roedel
On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > I *hate* the bizarre calling convention for iommu_unmap(). Is it > actually clearly documented anywhere? Why on earth is it not just > returning void, and expected to unmap what it was *asked* to unmap? Yeah, I agree that this shou

Re: [PATCH 6/7] iommu/arm-smmu: Add module parameter arm-smmu=off|force_isolation

2013-09-25 Thread Andreas Herrmann
On Tue, Sep 24, 2013 at 11:42:18AM -0400, Will Deacon wrote: > On Tue, Sep 24, 2013 at 04:07:00PM +0100, Andreas Herrmann wrote: > > arm-smmu= arm-smmu driver option > > > > off Disable arm-smmu driver (ie. ignore available SMMUs) > > > > force_isolation > > Try to attac

[PATCH 1/3] MSM: Remove iommu include from drivers/gpu/drm/msm/mdp4/mdp4_kms.c

2013-09-25 Thread Joerg Roedel
The include file has been removed and the file does not need it anyway, so remove it. Fixes a compile error. Signed-off-by: Joerg Roedel --- drivers/gpu/drm/msm/mdp4/mdp4_kms.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp4

[PATCH 2/3] Fix compile error in drivers/gpu/drm/msm/msm_drv.c

2013-09-25 Thread Joerg Roedel
The include file has been moved but this file was not updated, so compile breaks. Signed-off-by: Joerg Roedel --- drivers/gpu/drm/msm/Makefile |3 --- drivers/gpu/drm/msm/msm_drv.c |5 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/Makefile b/dr

[PATCH 3/3] Fix compile error in drivers/gpu/drm/msm/msm_drv.c with IOMMU disabled

2013-09-25 Thread Joerg Roedel
The function msm_iommu_get_ctx() is needed buy the MSM-GPU driver with and wiithout IOMMU compiled in. Make the function available when no IOMMU driver is there. Signed-off-by: Joerg Roedel --- drivers/iommu/msm_iommu.h |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/iommu/

Re: [PATCH 4/7] iommu/arm-smmu: Check for num_context_irqs > 0 to avoid divide by zero exception

2013-09-25 Thread Andreas Herrmann
On Tue, Sep 24, 2013 at 11:40:48AM -0400, Will Deacon wrote: > On Tue, Sep 24, 2013 at 04:06:58PM +0100, Andreas Herrmann wrote: > > With the right (or wrong;-) definition of v1 SMMU node in DTB it is > > possible to trigger a division by zero in arm_smmu_init_domain_context > > (if number of conte

Re: [PATCH v4 0/2] iommu: Add iommu_error class event to iommu trace

2013-09-25 Thread Joerg Roedel
On Tue, Sep 24, 2013 at 03:21:18PM -0600, Shuah Khan wrote: > Shuah Khan (2): > iommu: Add iommu_error class event to iommu trace > iommu: Change iommu driver to call io_page_fault trace event Applied to the tracing branch, thanks Shuah. ___ iommu