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

2013-09-19 Thread Bharat Bhushan
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 bharat.bhus...@freescale.com --- drivers/iommu/iommu.c | 10

[PATCH 1/7] powerpc: Add interface to get msi region information

2013-09-19 Thread Bharat Bhushan
to create IOMMU (Freescale PAMU) mapping for devices which are directly assigned using VFIO. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/machdep.h |8 +++ arch/powerpc/include/asm/pci.h |2 + arch/powerpc/kernel/msi.c | 18

[PATCH 4/7] powerpc: translate msi addr to iova if iommu is in use

2013-09-19 Thread Bharat Bhushan
If the device is attached with iommu domain then set MSI address to the iova configured in PAMU. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/sysdev/fsl_msi.c | 56 +++- 1 files changed, 54 insertions(+), 2 deletions(-) diff

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

2013-09-19 Thread Bharat Bhushan
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 by step. Signed-off-by: Bharat Bhushan bharat.bhus

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

2013-09-19 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- 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..8a8156a 100644 --- a/drivers/vfio/pci

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

2013-09-19 Thread Bharat Bhushan
-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- drivers/vfio/Kconfig |6 + drivers/vfio/Makefile |1 + drivers/vfio/vfio_iommu_fsl_pamu.c | 952 include/uapi/linux/vfio.h | 100 4 files changed, 1059

[PATCH 3/7] fsl iommu: add get_dev_iommu_domain

2013-09-19 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com returns the iommu_domain of the requested device for fsl pamu. Use PCI controller dev struct for pci devices as current LIODN schema assign LIODN to PCI controller not PCI device. This will be corrected with proper LIODN schema. Signed-off

[PATCH 0/7] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-09-19 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patchset adds support for vfio-pci with 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 describing

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-24 Thread Bharat Bhushan
, Bharat Bhushan wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Thursday, November 21, 2013 12:17 AM To: Bhushan Bharat-R65777 Cc: j...@8bytes.org; bhelg...@google.com; ag...@suse.de; Wood Scott-B07421; Yoder Stuart

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-27 Thread Bharat Bhushan
...@google.com; linuxppc- d...@lists.ozlabs.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU) On Mon, 2013-11-25 at 05:33 +, Bharat Bhushan wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-28 Thread Bharat Bhushan
:33 +, Bharat Bhushan wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Friday, November 22, 2013 2:31 AM To: Wood Scott-B07421 Cc: Bhushan Bharat-R65777; linux-...@vger.kernel.org; ag...@suse.de; Yoder Stuart-B08248

RE: [PATCH 1/9 v2] pci:msi: add weak function for returning msi region info

2013-11-28 Thread Bharat Bhushan
, Bharat Bhushan wrote: In Aperture type of IOMMU (like FSL PAMU), VFIO-iommu system need to know the MSI region to map its window in h/w. This patch just defines the required weak functions only and will be used by followup patches. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com

RE: [PATCH v4 1/4] dma: imx-sdma: Add sdma firmware version 2 support

2013-11-09 Thread Bharat Bhushan
-Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Nicolin Chen Sent: Friday, November 08, 2013 4:20 PM To: vinod.k...@intel.com; dan.j.willi...@intel.com; s.ha...@pengutronix.de; ti...@tabi.org;

RE: [PATCH v9] PPC: POWERNV: move iommu_add_device earlier

2013-11-13 Thread Bharat Bhushan
from Freescale driver. iommu_add_device() and iommu_del_device() are public now. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Tested-by: Bharat Bhushan bharat.bhus...@freescale.com --- Changes: v9: * removed KVM from the subject as it is not really a KVM patch so PPC mainainter

[PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-18 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com PAMU (FSL IOMMU) has a concept of primary window and subwindows. Primary window corresponds to the complete guest iova address space (including MSI space), with respect to IOMMU_API this is termed as geometry. IOVA Base of subwindow is determined

[PATCH 2/9 v2] pci: msi: expose msi region information functions

2013-11-18 Thread Bharat Bhushan
So by now we have defined all the interfaces for getting the msi region, this patch expose the interface to linux subsystem. These will be used by vfio subsystem for setting up iommu for MSI interrupt of direct assignment devices. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1

[PATCH 3/9 v2] powerpc: pci: Add arch specific msi region interface

2013-11-18 Thread Bharat Bhushan
This patch adds the interface to get the msi region information from arch specific code. The machine spicific code is not yet defined. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 - None arch/powerpc/include/asm/machdep.h |8 arch/powerpc/kernel/msi.c

[PATCH 5/9 v2] pci/msi: interface to set an iova for a msi region

2013-11-18 Thread Bharat Bhushan
This patch defines an interface by which a msi page can be mapped to a specific iova page. This is a requirement in aperture type of IOMMUs (like Freescale PAMU), where we map msi iova page just after guest memory iova address. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2

[PATCH 7/9 v2] pci: msi: Extend msi iova setting interface to powerpc arch

2013-11-18 Thread Bharat Bhushan
Now we Keep track of devices which have msi page mapping to specific iova page for all msi bank. When composing MSI address and data then this list will be traversed. If device found in the list then use configured iova page otherwise iova page will be taken as before. Signed-off-by: Bharat

[PATCH 8/9 v2] vfio: moving some functions in common file

2013-11-18 Thread Bharat Bhushan
. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 - removed un-necessary header file inclusion - mark static function which are internal to *common.c drivers/vfio/Makefile|4 +- drivers/vfio/vfio_iommu_common.c | 227

[PATCH 6/9 v2] powerpc: pci: Extend msi iova page setup to arch specific

2013-11-18 Thread Bharat Bhushan
This patch extend the interface to arch specific code for setting msi iova address for a msi page. Machine specific code is not yet implemented. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2 - new patch arch/powerpc/include/asm/machdep.h |2 ++ arch/powerpc/kernel/msi.c

[PATCH 4/9 v2] powerpc: msi: Extend the msi region interface to get info from fsl_msi

2013-11-18 Thread Bharat Bhushan
(Freescale PAMU) mapping for devices which are directly assigned using VFIO. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 - Atomic increment of bank index for parallel probe of msi node arch/powerpc/sysdev/fsl_msi.c | 42 +++- arch

[PATCH 1/9 v2] pci:msi: add weak function for returning msi region info

2013-11-18 Thread Bharat Bhushan
In Aperture type of IOMMU (like FSL PAMU), VFIO-iommu system need to know the MSI region to map its window in h/w. This patch just defines the required weak functions only and will be used by followup patches. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 - Added

[PATCH 9/9 v2] vfio pci: Add vfio iommu implementation for FSL_PAMU

2013-11-18 Thread Bharat Bhushan
). Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 - Use lock around msi-dma list - check for overlap between dma and msi-dma pages - Some code cleanup as per various comments drivers/vfio/Kconfig |6 + drivers/vfio/Makefile |1 + drivers

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-12-05 Thread Bharat Bhushan
; linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU) On Thu, 2013-11-28 at 03:19 -0600, Bharat Bhushan wrote: -Original Message- From: Bhushan Bharat-R65777 Sent: Wednesday, November 27, 2013 9:39 PM To: 'Alex Williamson

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-12-05 Thread Bharat Bhushan
; linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU) On Sun, 2013-11-24 at 23:33 -0600, Bharat Bhushan wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Friday, November 22, 2013 2:31

[PATCH 2/6 v5] powerpc: move debug registers in a structure

2013-06-25 Thread Bharat Bhushan
This way we can use same data type struct with KVM and also help in using other debug related function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/processor.h | 38 + arch/powerpc/include/asm/reg_booke.h |8 +- arch/powerpc/kernel/asm

[PATCH 0/6 v5] KVM :PPC: Userspace Debug support

2013-06-25 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Note: These patches are based on http://github.com/agraf/linux-2.6.git queue This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. We are now assuming that debug resource

[PATCH 6/6 v5] KVM: PPC: Add userspace debug stub support

2013-06-25 Thread Bharat Bhushan
or not. If this is unexpected exception (breakpoint/watchpoint event not set by userspace) then let us leave the action on user space. This is similar to what it was before, only thing is that now we have proper exit state available to user space. Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH 3/6 v5] powerpc: export debug registers save function for KVM

2013-06-25 Thread Bharat Bhushan
KVM need this function when switching from vcpu to user-space thread. My subsequent patch will use this function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/switch_to.h |4 arch/powerpc/kernel/process.c|3 ++- 2 files changed, 6

[PATCH 5/6 v5] KVM: PPC: Using struct debug_reg

2013-06-25 Thread Bharat Bhushan
For KVM also use the struct debug_reg defined in asm/processor.h Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_host.h | 13 + arch/powerpc/kvm/booke.c| 34 -- 2 files changed, 25 insertions

[PATCH 4/6 v5] KVM: PPC: exit to user space on ehpriv instruction

2013-06-25 Thread Bharat Bhushan
ehpriv instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with run-debug have relevant information. As this is the first point we are using run-debug, also defined the run-debug structure. Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH 1/6 v5] powerpc: remove unnecessary line continuations

2013-06-25 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kernel/process.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index ceb4e7b..639a8de 100644 --- a/arch/powerpc/kernel/process.c

[PATCH 4/5 RFC] pci: msi: expose msi region information functions

2013-10-29 Thread Bharat Bhushan
So by now we have defined all the interfaces for getting the msi region, this patch expose the interface to linux subsystem. These will be used by vfio subsystem for setting up iommu for MSI interrupt of direct assignment devices. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com

[PATCH 1/5 RFC] pci:msi: add weak function for returning msi region info

2013-10-29 Thread Bharat Bhushan
In Aperture type of IOMMU (like FSL PAMU), VFIO-iommu system need to know the MSI region to map its window in h/w. This patch just defines the required weak functions only and will be used by followup patches. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- drivers/pci/msi.c

[PATCH 5/5 RFC] vfio: setup iova-base for msi interrupts for vfio assigned device

2013-10-29 Thread Bharat Bhushan
on design. I will divide this in multiple logical patches once this design is accepted. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/machdep.h |2 + arch/powerpc/kernel/msi.c | 10 ++ arch/powerpc/sysdev/fsl_msi.c | 64

[PATCH 3/5 RFC] powerpc: msi: Extend the msi region interface to get info from fsl_msi

2013-10-29 Thread Bharat Bhushan
(Freescale PAMU) mapping for devices which are directly assigned using VFIO. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/sysdev/fsl_msi.c | 42 +++- arch/powerpc/sysdev/fsl_msi.h | 11 - 2 files changed, 45 insertions

[PATCH 0/5 RFC] vfio/pci: add interface to for MSI support with FSL PAMU

2013-10-29 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com PAMU (FSL IOMMU) has a concept of primary window and subwindows. Primary window corresponds to the complete guest iova address space (including MSI space), with respect to IOMMU_API this is termed as geometry. IOVA Base of subwindow is determined

[PATCH 2/5 RFC] powerpc: pci: Add arch specific msi region interface

2013-10-29 Thread Bharat Bhushan
This patch adds the interface to get the msi region information from arch specific code. The machine spicific code is not yet defined. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/machdep.h |8 arch/powerpc/kernel/msi.c | 18

[PATCH 1/2] powerpc: remove unnecessary line continuations

2013-07-04 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kernel/process.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index c517dbe..19b8733 100644 --- a/arch/powerpc/kernel/process.c

[PATCH 0/2] powerpc: allow kvm to use kerel debug framework

2013-07-04 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patchset moves the debug registers in a structure, which allows kvm to use same structure for debug emulation. Note: Earilier a patchset https://lists.ozlabs.org/pipermail/linuxppc-dev/2013-June/108132.html; was sent which is a bunch of six

[PATCH 2/2] powerpc: move debug registers in a structure

2013-07-04 Thread Bharat Bhushan
This way we can use same data type struct with KVM and also help in using other debug related function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/processor.h | 38 + arch/powerpc/include/asm/reg_booke.h |8 +- arch/powerpc/kernel/asm

[PATCH] fsl mc-bus: Move mc-io destroy to bus remove

2016-06-16 Thread Bharat Bhushan
-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- drivers/staging/fsl-mc/bus/dprc-driver.c | 3 +++ drivers/staging/fsl-mc/bus/mc-bus.c | 8 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-dr

RE: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-11-18 Thread Bharat Bhushan
Hi Eric, Have you sent out QEMU side patches based on this new approach? In case I missed please point me the patches? Thanks -Bharat > -Original Message- > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > boun...@lists.linux-foundation.org] On Behalf Of Eric Auger >

RE: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-12-07 Thread Bharat Bhushan
Hi Eric, I have tested this series on NXP platform. Thanks -Bharat > -Original Message- > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > boun...@lists.linux-foundation.org] On Behalf Of Eric Auger > Sent: Tuesday, November 15, 2016 6:39 PM > To: eric.au...@redhat.com;

RE: [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2017-01-11 Thread Bharat Bhushan
t.agra...@arm.com; Diana Madalina > Craciun <diana.crac...@nxp.com>; gpkulka...@gmail.com; > shank...@codeaurora.org; Bharat Bhushan <bharat.bhus...@nxp.com>; > geethasowjanya.ak...@gmail.com > Subject: [PATCH v8 00/18] KVM PCIe/MSI passthrough on ARM/ARM64 and > IOVA reserved re

RE: [PATCH v6 17/18] vfio/type1: Check MSI remapping at irq domain level

2017-01-06 Thread Bharat Bhushan
> -Original Message- > From: Marc Zyngier [mailto:marc.zyng...@arm.com] > Sent: Friday, January 06, 2017 2:50 PM > To: Auger Eric <eric.au...@redhat.com>; Bharat Bhushan > <bharat.bhus...@nxp.com>; eric.auger@gmail.com; > christoffer.d...@li

RE: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap

2017-01-05 Thread Bharat Bhushan
Craciun <diana.crac...@nxp.com>; iommu@lists.linux- > foundation.org; pranav.sawargaon...@gmail.com; Bharat Bhushan > <bharat.bhus...@nxp.com>; shank...@codeaurora.org; > gpkulka...@gmail.com > Subject: Re: [PATCH v5 13/17] irqdomain: irq_domain_check_msi_remap > > Hi M

RE: [PATCH v6 17/18] vfio/type1: Check MSI remapping at irq domain level

2017-01-06 Thread Bharat Bhushan
t.agra...@arm.com; Diana Madalina > Craciun <diana.crac...@nxp.com>; gpkulka...@gmail.com; > shank...@codeaurora.org; Bharat Bhushan <bharat.bhus...@nxp.com>; > geethasowjanya.ak...@gmail.com > Subject: [PATCH v6 17/18] vfio/type1: Check MSI remapping at irq domain > level

RE: [RFC v4 00/16] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-12-20 Thread Bharat Bhushan
v.sawargaon...@gmail.com; > io...@lists.linux-foundation.org; punit.agra...@arm.com; Diana Madalina > Craciun <diana.crac...@nxp.com>; gpkulka...@gmail.com; > shank...@codeaurora.org; Bharat Bhushan <bharat.bhus...@nxp.com> > Subject: [RFC v4 00/16] KVM PCIe/MSI passthrough on AR

RE: [upstream-release] [PATCH v5 5/8] bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2

2016-12-19 Thread Bharat Bhushan
> -Original Message- > From: upstream-release-boun...@linux.freescale.net [mailto:upstream- > release-boun...@linux.freescale.net] On Behalf Of Stuart Yoder > Sent: Friday, December 16, 2016 10:01 PM > To: gre...@linuxfoundation.org > Cc: de...@driverdev.osuosl.org; ag...@suse.de;

[PATCH] ARM64/PCI: Allow userspace to mmap PCI resources

2017-05-03 Thread Bharat Bhushan
This patch allows user-space to mmap PCI resources. This patch is inline to arm32 bit implementation. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- arch/arm64/include/asm/pci.h | 4 arch/arm64/kernel/pci.c | 19 +++ 2 files changed, 23 insertions(+)

RE: [PATCH] ARM64/PCI: Allow userspace to mmap PCI resources

2017-05-03 Thread Bharat Bhushan
> -Original Message- > From: Lorenzo Pieralisi [mailto:lorenzo.pieral...@arm.com] > Sent: Wednesday, May 03, 2017 9:29 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com> > Cc: catalin.mari...@arm.com; will.dea...@arm.com; > bhelg...@google.com; linux-arm-ker...@li

RE: [PATCH] kexec/kdump: Minor Documentation updates for arm64 and Image

2017-05-18 Thread Bharat Bhushan
> -Original Message- > From: Dave Young [mailto:dyo...@redhat.com] > Sent: Thursday, May 18, 2017 11:29 AM > To: Bharat Bhushan <bharat.bhus...@nxp.com> > Cc: b...@redhat.com; vgo...@redhat.com; cor...@lwn.net; > ke...@lists.infradead.org; linux-...@vger.

[PATCH v2] kexec/kdump: Minor Documentation updates for arm64 and Image

2017-05-18 Thread Bharat Bhushan
This patch have minor updates in Documentation for arm64i as relocatable kernel. Also this patch updates documentation for using uncompressed image "Image" which is used for ARM64. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- v1->v2 - "

[PATCH] kexec/kdump: Minor Documentation updates for arm64 and Image

2017-05-17 Thread Bharat Bhushan
This patch have minor updates in Documentation for arm64i as relocatable kernel. Also this patch updates documentation for using uncompressed image "Image" which is used for ARM64. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- Documentation/kdump/kdump.txt | 10 ++

RE: [PATCH] kexec/kdump: Minor Documentation updates for arm64 and Image

2017-05-22 Thread Bharat Bhushan
> -Original Message- > From: Pratyush Anand [mailto:pan...@redhat.com] > Sent: Monday, May 22, 2017 12:09 PM > To: AKASHI Takahiro <takahiro.aka...@linaro.org>; Dave Young > <dyo...@redhat.com>; Bharat Bhushan <bharat.bhus...@nxp.com>; > b...@redhat.co

RE: [PATCH] iommu/dma: Setup iova_domain granule for IOMMU_DMA_MSI cookies

2017-05-04 Thread Bharat Bhushan
Hi Robin, I faced same issue on our platform and debugged to get the root cause of the issue. Also fixed in somewhat similar way, cleared iova_off and not change size for if cookie->type is IOMMU_DMA_MSI_COOKIE. Anyways that was not as good as below changes. While just now I saw this was

RE: [PATCH] RM64: dts: ls208xa: Add iommu-map property for pci

2017-09-06 Thread Bharat Bhushan
Hi Robin, > -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Friday, September 01, 2017 4:29 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; Marc Zyngier > <marc.zyng...@arm.com>; robh...@kernel.org; Mark Rutland > <mark.rutl

RE: [PATCH] RM64: dts: ls208xa: Add iommu-map property for pci

2017-09-27 Thread Bharat Bhushan
Hi Robin, > -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Bharat Bhushan > Sent: Wednesday, September 06, 2017 12:47 PM > To: Robin Murphy <robin.mur...@arm.com>; Marc Zyngier > <

RE: [PATCH] RM64: dts: ls208xa: Add iommu-map property for pci

2017-08-31 Thread Bharat Bhushan
> -Original Message- > From: Marc Zyngier [mailto:marc.zyng...@arm.com] > Sent: Thursday, August 31, 2017 3:02 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; robh...@kernel.org; > ark.rutl...@arm.com; will.dea...@arm.com; o...@buserror.net; Gang Liu > <

[PATCH v2] ARM64: dts: ls208xa: Add iommu-map property for pci

2017-08-31 Thread Bharat Bhushan
This patch adds iommu-map property for PCIe, which enables SMMU for these devices on LS208xA devices. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- v1->v2 - Corrected "RM64" to "ARM64" arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 4 1 file c

RE: [PATCH] RM64: dts: ls208xa: Add iommu-map property for pci

2017-08-31 Thread Bharat Bhushan
> -Original Message- > From: Marc Zyngier [mailto:marc.zyng...@arm.com] > Sent: Thursday, August 31, 2017 4:20 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; robh...@kernel.org; > Mark Rutland <mark.rutl...@arm.com>; will.dea...@arm.com; > o...@buserror.n

[PATCH] RM64: dts: ls208xa: Add iommu-map property for pci

2017-08-31 Thread Bharat Bhushan
This patch adds iommu-map property for PCIe, which enables SMMU for these devices on LS208xA devices. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/fre

RE: [PATCH] RM64: dts: ls208xa: Add iommu-map property for pci

2017-09-01 Thread Bharat Bhushan
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Bharat Bhushan > Sent: Thursday, August 31, 2017 4:53 PM > To: Marc Zyngier <marc.zyng...@arm.com>; robh...@kernel.org; Mark > Rutla

RE: [PATCH v3] staging: fsl-mc: use 32bits to support 64K size mc-portals

2017-11-24 Thread Bharat Bhushan
Hi Greg, > -Original Message- > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > Sent: Friday, November 24, 2017 9:29 PM > To: Laurentiu Tudor <laurentiu.tu...@nxp.com> > Cc: Bharat Bhushan <bharat.bhus...@nxp.com>; Ruxandra Ioana R

[PATCH v3] staging: fsl-mc: use 32bits to support 64K size mc-portals

2017-11-21 Thread Bharat Bhushan
As per APIs each mc-portal is of 64K size while currently 16bits (type u16) is used to store size of mc-portal. In these cases upper bit of portal size gets truncated. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- v2->v3: - v2 patch: https://patchwork.kernel.org/patch

[PATCH] staging: fsl-mc: fix mc-portal to use uin32_t type

2017-11-20 Thread Bharat Bhushan
nges mc_io->portal_size from uin16_t to uin32_t Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- drivers/staging/fsl-mc/include/mc-sys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.

[PATCH v2] staging: fsl-mc: fix mc-portal to use u32 type

2017-11-20 Thread Bharat Bhushan
portal_size from u16 to u32 Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- drivers/staging/fsl-mc/include/mc-sys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h index dca7f90

RE: [RESEND PATCH 1/2 v2] staging: fsl-mc: Allocate IRQ's before scanning DPRC objects

2017-12-11 Thread Bharat Bhushan
> -Original Message- > From: Nipun Gupta [mailto:nipun.gu...@nxp.com] > Sent: Monday, December 11, 2017 9:16 PM > To: Laurentiu Tudor <laurentiu.tu...@nxp.com>; stuyo...@gmail.com; > Bharat Bhushan <bharat.bhus...@nxp.com>; gre...@linuxfoundation.org;

RE: [PATCH 1/2] staging: fsl-mc: Allocate IRQ's before scanning DPRC objects

2017-12-06 Thread Bharat Bhushan
Hi Laurentiu, > -Original Message- > From: Laurentiu Tudor > Sent: Wednesday, December 06, 2017 7:00 PM > To: Nipun Gupta <nipun.gu...@nxp.com>; stuyo...@gmail.com; Bharat > Bhushan <bharat.bhus...@nxp.com>; gre...@linuxfoundation.org; > cakt...@

RE: [upstream-release] [PATCH] irqchip/ls-scfg-msi: map MSIs in the iommu

2018-06-06 Thread Bharat Bhushan
> > Signed-off-by: Laurentiu Tudor Reviewed-by: Bharat Bhushan Thanks -Bharat > --- > drivers/irqchip/irq-ls-scfg-msi.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/irqchip/irq-ls-scfg-msi.c > b/drivers/irqchip/irq-ls-scfg-msi.c > index 57e3d9

RE: [RFC 3/5] powerpc/mpic: Add support for non-contiguous irq ranges

2018-08-07 Thread Bharat Bhushan
> -Original Message- > From: Scott Wood [mailto:o...@buserror.net] > Sent: Wednesday, August 8, 2018 2:34 AM > To: Rob Herring ; Bharat Bhushan > > Cc: b...@kernel.crashing.org; pau...@samba.org; m...@ellerman.id.au; > ga...@kernel.crashing.org; mark.rut

RE: [RFC 5/5] powerpc/fsl: Add supported-irq-ranges for P2020

2018-08-07 Thread Bharat Bhushan
> -Original Message- > From: Scott Wood [mailto:o...@buserror.net] > Sent: Wednesday, August 8, 2018 2:44 AM > To: Bharat Bhushan ; > b...@kernel.crashing.org; pau...@samba.org; m...@ellerman.id.au; > ga...@kernel.crashing.org; mark.rutl...@arm.com; > kstew...@lin

RE: [PATCH] powerpc/mpic: Cleanup irq vector accounting

2018-07-05 Thread Bharat Bhushan
> -Original Message- > From: Michael Ellerman [mailto:m...@ellerman.id.au] > Sent: Wednesday, July 4, 2018 6:57 PM > To: Bharat Bhushan ; > b...@kernel.crashing.org; pau...@samba.org; r...@kernel.org; > ge...@infradead.org; tyr...@linux.vnet.ibm.com; linuxppc- >

RE: [PATCH 2/6 v2] iommu: of: make of_pci_map_rid() available for other devices too

2018-04-17 Thread Bharat Bhushan
xppc- > d...@lists.ozlabs.org; linux-...@vger.kernel.org; Bharat Bhushan > <bharat.bhus...@nxp.com>; stuyo...@gmail.com; Laurentiu Tudor > <laurentiu.tu...@nxp.com>; Leo Li <leoyang...@nxp.com> > Subject: Re: [PATCH 2/6 v2] iommu: of: make of_pci_map_rid() available for > other

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Bharat Bhushan
- > ker...@vger.kernel.org; io...@lists.linux-foundation.org; linux- > wirel...@vger.kernel.org; linux-arm-...@vger.kernel.org; linux- > s...@vger.kernel.org; dmaeng...@vger.kernel.org; dri- > de...@lists.freedesktop.org; linux-te...@vger.kernel.org; > devicet...@vger.kernel.org; linux-...@v

RE: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-12-03 Thread Bharat Bhushan
Hi Alex, > -Original Message- > From: Alex Williamson > Sent: Friday, November 30, 2018 9:49 PM > To: Bharat Bhushan > Cc: Bjorn Helgaas ; Bjorn Helgaas > ; linux-...@vger.kernel.org; Linux Kernel Mailing List > ; bharatb.ya...@gmail.com; David Daney > ; jgla

RE: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-29 Thread Bharat Bhushan
Hi, > -Original Message- > From: Bjorn Helgaas > Sent: Thursday, November 29, 2018 1:46 AM > To: Bharat Bhushan > Cc: alex.william...@redhat.com; Bjorn Helgaas ; linux- > p...@vger.kernel.org; Linux Kernel Mailing List ker...@vger.kernel.org>; bharatb.ya...@g

RE: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-29 Thread Bharat Bhushan
Hi Alex, > -Original Message- > From: Alex Williamson > Sent: Friday, November 30, 2018 11:26 AM > To: Bharat Bhushan > Cc: Bjorn Helgaas ; Bjorn Helgaas > ; linux-...@vger.kernel.org; Linux Kernel Mailing List > ; bharatb.ya...@gmail.com; David Daney > ; jgla

RE: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-27 Thread Bharat Bhushan
Hi, > -Original Message- > From: Alex Williamson > Sent: Tuesday, November 27, 2018 9:39 PM > To: Bjorn Helgaas > Cc: Bharat Bhushan ; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; bharatb.ya...@gmail.com; David Daney > ; Jan Glauber ; Maik &g

[PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-27 Thread Bharat Bhushan
NXP (Freescale Vendor ID) LS1088 chips do not behave correctly after bus reset with e1000e. Link state of device does not comes UP and so config space never accessible again. Signed-off-by: Bharat Bhushan --- drivers/pci/quirks.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-24 Thread Bharat Bhushan
liamson wrote: > > > On Thu, 2013-11-21 at 11:20 +, Bharat Bhushan wrote: > > > > > > > > > -Original Message- > > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > > > Sent: Thursday, November 21,

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-27 Thread Bharat Bhushan
ndation.org; bhelg...@google.com; linuxppc- > d...@lists.ozlabs.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU) > > On Mon, 2013-11-25 at 05:33 +, Bharat Bhushan wrote: > > > > > -Original Message- >

RE: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-28 Thread Bharat Bhushan
; Subject: Re: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU > > (PAMU) > > > > On Mon, 2013-11-25 at 05:33 +, Bharat Bhushan wrote: > > > > > > > -Original Message- > > > > From: Alex Williamson [mailto:alex.william..

RE: [PATCH 1/9 v2] pci:msi: add weak function for returning msi region info

2013-11-28 Thread Bharat Bhushan
o > > On Tue, Nov 19, 2013 at 10:47:05AM +0530, Bharat Bhushan wrote: > > In Aperture type of IOMMU (like FSL PAMU), VFIO-iommu system need to > > know the MSI region to map its window in h/w. This patch just defines > > the required weak functions only and will be use

RE: [PATCH v4 1/4] dma: imx-sdma: Add sdma firmware version 2 support

2013-11-09 Thread Bharat Bhushan
> -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Nicolin > Chen > Sent: Friday, November 08, 2013 4:20 PM > To: vinod.k...@intel.com; dan.j.willi...@intel.com; s.ha...@pengutronix.de; > ti...@tabi.org;

RE: [PATCH v9] PPC: POWERNV: move iommu_add_device earlier

2013-11-13 Thread Bharat Bhushan
ned to them. > 2. moves a bus notifier to powernv code in order to avoid conflict with > the notifier from Freescale driver. > > iommu_add_device() and iommu_del_device() are public now. > > Signed-off-by: Alexey Kardashevskiy Tested-by: Bharat Bhushan > --- > Changes: >

[PATCH 4/5 RFC] pci: msi: expose msi region information functions

2013-10-29 Thread Bharat Bhushan
So by now we have defined all the interfaces for getting the msi region, this patch expose the interface to linux subsystem. These will be used by vfio subsystem for setting up iommu for MSI interrupt of direct assignment devices. Signed-off-by: Bharat Bhushan --- include/linux/pci.h | 13

[PATCH 1/5 RFC] pci:msi: add weak function for returning msi region info

2013-10-29 Thread Bharat Bhushan
In Aperture type of IOMMU (like FSL PAMU), VFIO-iommu system need to know the MSI region to map its window in h/w. This patch just defines the required weak functions only and will be used by followup patches. Signed-off-by: Bharat Bhushan --- drivers/pci/msi.c | 22

[PATCH 5/5 RFC] vfio: setup iova-base for msi interrupts for vfio assigned device

2013-10-29 Thread Bharat Bhushan
on design. I will divide this in multiple logical patches once this design is accepted. Signed-off-by: Bharat Bhushan --- arch/powerpc/include/asm/machdep.h |2 + arch/powerpc/kernel/msi.c | 10 ++ arch/powerpc/sysdev/fsl_msi.c | 64

[PATCH 3/5 RFC] powerpc: msi: Extend the msi region interface to get info from fsl_msi

2013-10-29 Thread Bharat Bhushan
(Freescale PAMU) mapping for devices which are directly assigned using VFIO. Signed-off-by: Bharat Bhushan --- arch/powerpc/sysdev/fsl_msi.c | 42 +++- arch/powerpc/sysdev/fsl_msi.h | 11 - 2 files changed, 45 insertions(+), 8 deletions(-) diff

[PATCH 0/5 RFC] vfio/pci: add interface to for MSI support with FSL PAMU

2013-10-29 Thread Bharat Bhushan
From: Bharat Bhushan PAMU (FSL IOMMU) has a concept of primary window and subwindows. Primary window corresponds to the complete guest iova address space (including MSI space), with respect to IOMMU_API this is termed as geometry. IOVA Base of subwindow is determined from the number

[PATCH 2/5 RFC] powerpc: pci: Add arch specific msi region interface

2013-10-29 Thread Bharat Bhushan
This patch adds the interface to get the msi region information from arch specific code. The machine spicific code is not yet defined. Signed-off-by: Bharat Bhushan --- arch/powerpc/include/asm/machdep.h |8 arch/powerpc/kernel/msi.c | 18 ++ 2 files

[PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-18 Thread Bharat Bhushan
From: Bharat Bhushan PAMU (FSL IOMMU) has a concept of primary window and subwindows. Primary window corresponds to the complete guest iova address space (including MSI space), with respect to IOMMU_API this is termed as geometry. IOVA Base of subwindow is determined from the number

[PATCH 2/9 v2] pci: msi: expose msi region information functions

2013-11-18 Thread Bharat Bhushan
So by now we have defined all the interfaces for getting the msi region, this patch expose the interface to linux subsystem. These will be used by vfio subsystem for setting up iommu for MSI interrupt of direct assignment devices. Signed-off-by: Bharat Bhushan --- v1->v2 - None include/li

[PATCH 3/9 v2] powerpc: pci: Add arch specific msi region interface

2013-11-18 Thread Bharat Bhushan
This patch adds the interface to get the msi region information from arch specific code. The machine spicific code is not yet defined. Signed-off-by: Bharat Bhushan --- v1->v2 - None arch/powerpc/include/asm/machdep.h |8 arch/powerpc/kernel/msi.c |

[PATCH 5/9 v2] pci/msi: interface to set an iova for a msi region

2013-11-18 Thread Bharat Bhushan
This patch defines an interface by which a msi page can be mapped to a specific iova page. This is a requirement in aperture type of IOMMUs (like Freescale PAMU), where we map msi iova page just after guest memory iova address. Signed-off-by: Bharat Bhushan --- v2 - new patch drivers/pci

[PATCH 7/9 v2] pci: msi: Extend msi iova setting interface to powerpc arch

2013-11-18 Thread Bharat Bhushan
Now we Keep track of devices which have msi page mapping to specific iova page for all msi bank. When composing MSI address and data then this list will be traversed. If device found in the list then use configured iova page otherwise iova page will be taken as before. Signed-off-by: Bharat

[PATCH 8/9 v2] vfio: moving some functions in common file

2013-11-18 Thread Bharat Bhushan
. Signed-off-by: Bharat Bhushan --- v1->v2 - removed un-necessary header file inclusion - mark static function which are internal to *common.c drivers/vfio/Makefile|4 +- drivers/vfio/vfio_iommu_common.c | 227 ++ drivers/v

  1   2   >