Re: [PATCH v5 3/3] drivers/vfio: Support EEH error injection

2015-03-31 Thread Alex Williamson
> reset */ > #define VFIO_EEH_PE_CONFIGURE 8 /* PE configuration > */ > +#define VFIO_EEH_PE_INJECT_ERR 9 /* Inject EEH error > */ > > #define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21) > I assume you want this to go in through the PPC tree, so Acked-by: Alex Williamson ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH kernel v7 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-03-31 Thread Alex Williamson
On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > Modern IBM POWERPC systems support multiple (currently two) TCE tables > per IOMMU group (a.k.a. PE). This adds a iommu_table_group container > for TCE tables. Right now just one table is supported. > > Signed-off-by: Alexey Kardashe

Re: [PATCH kernel v7 28/31] powerpc/mmu: Add userspace-to-physical addresses translation cache

2015-04-01 Thread Alex Williamson
On Sat, 2015-03-28 at 01:55 +1100, Alexey Kardashevskiy wrote: > We are adding support for DMA memory pre-registration to be used in > conjunction with VFIO. The idea is that the userspace which is going to > run a guest may want to pre-register a user space memory region so > it all gets pinned on

Re: [PATCH kernel v7 04/31] vfio: powerpc/spapr: Use it_page_size

2015-04-01 Thread Alex Williamson
On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > This makes use of the it_page_size from the iommu_table struct > as page size can differ. > > This replaces missing IOMMU_PAGE_SHIFT macro in commented debug code > as recently introduced IOMMU_PAGE_XXX macros do not include > IOMMU_

Re: [PATCH kernel v7 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-04-01 Thread Alex Williamson
On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > Modern IBM POWERPC systems support multiple (currently two) TCE tables > per IOMMU group (a.k.a. PE). This adds a iommu_table_group container > for TCE tables. Right now just one table is supported. > > Signed-off-by: Alexey Kardashe

Re: [PATCH kernel v7 04/31] vfio: powerpc/spapr: Use it_page_size

2015-04-01 Thread Alex Williamson
On Thu, 2015-04-02 at 13:30 +1100, Alexey Kardashevskiy wrote: > On 04/02/2015 08:48 AM, Alex Williamson wrote: > > On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > >> This makes use of the it_page_size from the iommu_table struct > >> as page size

Re: [PATCH kernel v7 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-04-01 Thread Alex Williamson
On Thu, 2015-04-02 at 13:33 +1100, Alexey Kardashevskiy wrote: > On 04/02/2015 08:48 AM, Alex Williamson wrote: > > On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > >> Modern IBM POWERPC systems support multiple (currently two) TCE tables > >> per IOMMU g

Re: [PATCH kernel v7 04/31] vfio: powerpc/spapr: Use it_page_size

2015-04-01 Thread Alex Williamson
On Thu, 2015-04-02 at 14:40 +1100, Alexey Kardashevskiy wrote: > On 04/02/2015 01:50 PM, Alex Williamson wrote: > > On Thu, 2015-04-02 at 13:30 +1100, Alexey Kardashevskiy wrote: > >> On 04/02/2015 08:48 AM, Alex Williamson wrote: > >>> On Sat, 2015-03-28 at 01:54 +11

Re: [PATCH kernel v7 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-02 Thread Alex Williamson
Should have sent this with the other comments, but found it hiding on my desktop... On Sat, 2015-03-28 at 01:55 +1100, Alexey Kardashevskiy wrote: > In order to support memory pre-registration, we need a way to track > the use of every registered memory region and only allow unregistration > if a

Re: [PATCH kernel v7 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-08 Thread Alex Williamson
On Wed, 2015-04-08 at 13:22 +1000, Alexey Kardashevskiy wrote: > On 04/03/2015 07:50 AM, Alex Williamson wrote: > > > > Should have sent this with the other comments, but found it hiding on my > > desktop... > > > > On Sat, 2015-03-28 at 01:55 +1100, Alexey Kard

Re: [PATCH kernel v8 15/31] powerpc/iommu: Fix IOMMU ownership control functions

2015-04-10 Thread Alex Williamson
On Fri, 2015-04-10 at 16:30 +1000, Alexey Kardashevskiy wrote: > This adds missing locks in iommu_take_ownership()/ > iommu_release_ownership(). > > This marks all pages busy in iommu_table::it_map in order to catch > errors if there is an attempt to use this table while ownership over it > is tak

Re: [PATCH kernel v8 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-10 Thread Alex Williamson
On Fri, 2015-04-10 at 16:31 +1000, Alexey Kardashevskiy wrote: > In order to support memory pre-registration, we need a way to track > the use of every registered memory region and only allow unregistration > if a region is not in use anymore. So we need a way to tell from what > region the just cl

Re: [PATCH kernel v8 00/31] powerpc/iommu/vfio: Enable Dynamic DMA windows

2015-04-10 Thread Alex Williamson
| 12 +- > arch/powerpc/platforms/pseries/iommu.c | 55 +- > arch/powerpc/sysdev/dart_iommu.c | 12 +- > drivers/vfio/vfio_iommu_spapr_tce.c | 1021 > --- > include/uapi/linux/vfio.h | 88 ++- > 20 files changed, 2218 insertions(+), 492 deletions(-) > create mode 100644 arch/powerpc/mm/mmu_context_hash64_iommu.c There are still some issues that need to be addressed in arch code, I've noted them in comments for patches 15 & 26. I think I've run out of issues for the vfio changes, so for the vfio related changes in patches 1-8,12-14,17,25,29-31: Acked-by: Alex Williamson ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH kernel v7 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-08 Thread Alex Williamson
On Thu, 2015-04-09 at 13:21 +1000, Alexey Kardashevskiy wrote: > On 04/09/2015 01:43 AM, Alex Williamson wrote: > > On Wed, 2015-04-08 at 13:22 +1000, Alexey Kardashevskiy wrote: > >> On 04/03/2015 07:50 AM, Alex Williamson wrote: > >>> > >>> Should h

Re: [PATCH kernel v9 02/32] Revert "powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically"

2015-04-27 Thread Alex Williamson
On Sat, 2015-04-25 at 22:14 +1000, Alexey Kardashevskiy wrote: > This reverts commit 9e8d4a19ab66ec9e132d405357b9108a4f26efd3 as > tce32_table has exactly the same life time as the whole PE. scripts/checkpatch.pl would like your commit reference to appear as: commit 9e8d4a19ab66 ("powerpc/powernv

Re: [PATCH kernel v9 16/32] powerpc/powernv/ioda: Move TCE kill register address to PE

2015-04-27 Thread Alex Williamson
On Sat, 2015-04-25 at 22:14 +1000, Alexey Kardashevskiy wrote: > At the moment the DMA setup code looks for the "ibm,opal-tce-kill" property > which contains the TCE kill register address. Writes to this register > invalidates TCE cache on IODA/IODA2 hub. > > This moves the register address from i

Re: [PATCH kernel v9 30/32] vfio: powerpc/spapr: Use 32bit DMA window properties from table_group

2015-04-27 Thread Alex Williamson
; v9: > * new in the series - to make the next patch simpler > --- > drivers/vfio/vfio_iommu_spapr_tce.c | 19 +++ > 1 file changed, 11 insertions(+), 8 deletions(-) Acked-by: Alex Williamson > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/driver

Re: [PATCH kernel v10 16/34] powerpc/spapr: vfio: Replace iommu_table with iommu_table_group

2015-05-13 Thread Alex Williamson
- > arch/powerpc/kernel/iommu.c | 17 ++--- > arch/powerpc/platforms/powernv/pci-ioda.c | 55 +++--- > arch/powerpc/platforms/powernv/pci-p5ioc2.c | 18 +++-- > arch/powerpc/platforms/powernv/pci.h| 3 +- > arch/powerpc/platforms/pseries/iommu.c

Re: [PATCH kernel v10 28/34] vfio: powerpc/spapr: powerpc/powernv/ioda: Define and implement DMA windows API

2015-05-13 Thread Alex Williamson
+++--- > arch/powerpc/platforms/powernv/pci-p5ioc2.c | 7 ++- > drivers/vfio/vfio_iommu_spapr_tce.c | 19 +++--- > 4 files changed, 124 insertions(+), 17 deletions(-) For vfio: Acked-by: Alex Williamson > > diff --git a/arch/powerpc/include/asm/iommu.h > b/arch/powe

Re: [PATCH kernel v10 33/34] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-05-13 Thread Alex Williamson
ontains userspace address, one per TCE entry. The table is only > allocated when the ownership over an IOMMU group is taken which means > it is only used from outside of the powernv code (such as VFIO). > > Signed-off-by: Alexey Kardashevskiy > [aw: for the vfio related changes] >

Re: [PATCH kernel v10 05/34] powerpc/iommu: Always release iommu_table in iommu_free_table()

2015-05-13 Thread Alex Williamson
On Thu, 2015-05-14 at 12:34 +1000, Alexey Kardashevskiy wrote: > On 05/14/2015 09:27 AM, Gavin Shan wrote: > > On Wed, May 13, 2015 at 02:51:36PM +0200, Thomas Huth wrote: > >> On Wed, 13 May 2015 16:30:16 +1000 > >> Alexey Kardashevskiy wrote: > >> > >>> On 05/13/2015 03:33 PM, Gavin Shan wrote:

Re: [PATCH v2 03/13] powerpc/spapr: vfio: Implement spapr_tce_iommu_ops

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 13:00 +1000, Alexey Kardashevskiy wrote: > Modern IBM POWERPC systems support multiple IOMMU tables per PE > so we need a more reliable way (compared to container_of()) to get > a PE pointer from the iommu_table struct pointer used in IOMMU functions. > > At the moment IOMMU

Re: [PATCH v2 04/13] powerpc/powernv: Convert/move set_bypass() callback to take_ownership()

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 13:00 +1000, Alexey Kardashevskiy wrote: > At the moment the iommu_table struct has a set_bypass() which enables/ > disables DMA bypass on IODA2 PHB. This is exposed to POWERPC IOMMU code > which calls this callback when external IOMMU users such as VFIO are > about to get ove

Re: [PATCH v2 13/13] vfio: powerpc/spapr: Enable Dynamic DMA windows

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 13:01 +1000, Alexey Kardashevskiy wrote: > This defines and implements VFIO IOMMU API which lets the userspace > create and remove DMA windows. > > This updates VFIO_IOMMU_SPAPR_TCE_GET_INFO to return the number of > available windows and page mask. > > This adds VFIO_IOMMU_

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: > From: Alexey Kardashevskiy > > The IOMMU API implements groups creating/deletion, device binding > and IOMMU map/unmap operations. > > The PowerPC implementation uses most of the API except map/unmap > operations, which are implemented o

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Tue, 2013-05-07 at 10:49 +1000, Alexey Kardashevskiy wrote: > On 05/07/2013 07:07 AM, Alex Williamson wrote: > > On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: > >> From: Alexey Kardashevskiy > >> > >> The IOMMU API implements groups creating/del

Re: [PATCH 0/5 v2] VFIO PPC64: add VFIO support on POWERPC64

2013-05-23 Thread Alex Williamson
On Tue, 2013-05-21 at 13:33 +1000, Alexey Kardashevskiy wrote: > The series adds support for VFIO on POWERPC in user space (such as QEMU). > The in-kernel real mode IOMMU support is added by another series posted > separately. > > As the first and main aim of this series is the POWERNV platform su

Re: [PATCH 2/3] powerpc/vfio: Implement IOMMU driver for VFIO

2013-05-24 Thread Alex Williamson
u_spapr_tce.c > new file mode 100644 > index 000..bdae7a0 > --- /dev/null > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -0,0 +1,377 @@ > +/* > + * VFIO: IOMMU DMA mapping support for TCE on POWER > + * > + * Copyright (C) 2013 IBM Corp. All rights reserved. >

Re: [PATCH 3/3] powerpc/vfio: Enable on pSeries platform

2013-05-24 Thread Alex Williamson
On Tue, 2013-05-21 at 13:33 +1000, Alexey Kardashevskiy wrote: > The enables VFIO on the pSeries platform, enabling user space > programs to access PCI devices directly. > > Signed-off-by: Alexey Kardashevskiy > Cc: David Gibson > Signed-off-by: Paul Mackerras Acked-b

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-16 Thread Alex Williamson
On Mon, 2013-06-17 at 08:39 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2013-06-05 at 16:11 +1000, Alexey Kardashevskiy wrote: > > +long kvm_vm_ioctl_create_spapr_tce_iommu(struct kvm *kvm, > > + struct kvm_create_spapr_tce_iommu *args) > > +{ > > + struct kvmppc_spapr_tce_ta

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-17 Thread Alex Williamson
On Mon, 2013-06-17 at 13:56 +1000, Benjamin Herrenschmidt wrote: > On Sun, 2013-06-16 at 21:13 -0600, Alex Williamson wrote: > > > IOMMU groups themselves don't provide security, they're accessed by > > interfaces like VFIO, which provide the security. Given a brief l

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-18 Thread Alex Williamson
On Tue, 2013-06-18 at 14:38 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-06-17 at 20:32 -0600, Alex Williamson wrote: > > > Right, we don't want to create dependencies across modules. I don't > > have a vision for how this should work. This is effectively a co

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-19 Thread Alex Williamson
On Thu, 2013-06-20 at 00:50 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2013-06-19 at 11:58 +0200, Alexander Graf wrote: > > > > Alex, any objection ? > > > > Which Alex? :) > > Heh, mostly Williamson in this specific case but your input is still > welcome :-) > > > I think validate works, i

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-20 Thread Alex Williamson
On Thu, 2013-06-20 at 18:48 +1000, Alexey Kardashevskiy wrote: > On 06/20/2013 05:47 PM, Benjamin Herrenschmidt wrote: > > On Thu, 2013-06-20 at 15:28 +1000, David Gibson wrote: > >>> Just out of curiosity - would not get_file() and fput_atomic() on a > >> group's > >>> file* do the right job inste

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-22 Thread Alex Williamson
On Sat, 2013-06-22 at 22:03 +1000, David Gibson wrote: > On Thu, Jun 20, 2013 at 08:55:13AM -0600, Alex Williamson wrote: > > On Thu, 2013-06-20 at 18:48 +1000, Alexey Kardashevskiy wrote: > > > On 06/20/2013 05:47 PM, Benjamin Herrenschmidt wrote: > > > > On Thu, 20

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-23 Thread Alex Williamson
On Mon, 2013-06-24 at 13:52 +1000, David Gibson wrote: > On Sat, Jun 22, 2013 at 08:28:06AM -0600, Alex Williamson wrote: > > On Sat, 2013-06-22 at 22:03 +1000, David Gibson wrote: > > > On Thu, Jun 20, 2013 at 08:55:13AM -0600, Alex Williamson wrote: > > > > On

Re: [PATCH 3/3 v16] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-06-24 Thread Alex Williamson
On Thu, 2013-06-20 at 21:31 +0530, Varun Sethi wrote: > +#define REQ_ACS_FLAGS(PCI_ACS_SV | PCI_ACS_RR | PCI_ACS_CR | > PCI_ACS_UF) > + > +static struct iommu_group *get_device_iommu_group(struct device *dev) > +{ > + struct iommu_group *group; > + > + group = iommu_group_get(dev)

Re: [PATCH 3/3 v16] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-06-26 Thread Alex Williamson
On Wed, 2013-06-26 at 06:24 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, June 25, 2013 10:27 AM > > To: Sethi Varun-B16395 > > Cc: j...@8bytes.org; io...@lis

Re: [PATCH v2] vfio: add external user support

2013-06-27 Thread Alex Williamson
On Thu, 2013-06-27 at 17:14 +1000, Alexey Kardashevskiy wrote: > VFIO is designed to be used via ioctls on file descriptors > returned by VFIO. > > However in some situations support for an external user is required. > The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to > use the

Re: [PATCH v2] vfio: add external user support

2013-06-27 Thread Alex Williamson
On Fri, 2013-06-28 at 08:57 +1000, Alexey Kardashevskiy wrote: > On 06/28/2013 01:44 AM, Alex Williamson wrote: > > On Thu, 2013-06-27 at 17:14 +1000, Alexey Kardashevskiy wrote: > >> VFIO is designed to be used via ioctls on file descriptors > >> returned by VFIO

Re: [PATCH v2] vfio: add external user support

2013-06-27 Thread Alex Williamson
On Fri, 2013-06-28 at 11:38 +1000, Alexey Kardashevskiy wrote: > On 06/28/2013 10:41 AM, Alex Williamson wrote: > > On Fri, 2013-06-28 at 08:57 +1000, Alexey Kardashevskiy wrote: > >> On 06/28/2013 01:44 AM, Alex Williamson wrote: > >>> On Thu, 2013-06-27 at 17:14 +10

Re: [PATCH 3/3 v17] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-06-28 Thread Alex Williamson
On Fri, 2013-06-28 at 13:08 +0530, Varun Sethi wrote: > Following is a brief description of the PAMU hardware: > PAMU determines what action to take and whether to authorize the action on > the basis of the memory address, a Logical IO Device Number (LIODN), and > PAACT table (logically) indexed by

Re: [PATCH 3/3 v18] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-07-01 Thread Alex Williamson
ows. > > This patch provides the PAMU driver (fsl_pamu.c) and the corresponding IOMMU > API implementation (fsl_pamu_domain.c). The PAMU hardware driver (fsl_pamu.c) > has been derived from the work done by Ashish Kalra and Timur Tabi. > > Signed-off-by: Timur Tabi >

Re: [PATCH 3/8] vfio: add external user support

2013-07-08 Thread Alex Williamson
On Sun, 2013-07-07 at 01:07 +1000, Alexey Kardashevskiy wrote: > VFIO is designed to be used via ioctls on file descriptors > returned by VFIO. > > However in some situations support for an external user is required. > The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to > use the

Re: [PATCH 3/8] vfio: add external user support

2013-07-09 Thread Alex Williamson
On Tue, 2013-07-09 at 15:40 +1000, Alexey Kardashevskiy wrote: > On 07/09/2013 07:52 AM, Alex Williamson wrote: > > On Sun, 2013-07-07 at 01:07 +1000, Alexey Kardashevskiy wrote: > >> VFIO is designed to be used via ioctls on file descriptors > >> returned by VFIO

Re: [PATCH 03/10] vfio: add external user support

2013-07-22 Thread Alex Williamson
On Tue, 2013-07-16 at 10:53 +1000, Alexey Kardashevskiy wrote: > VFIO is designed to be used via ioctls on file descriptors > returned by VFIO. > > However in some situations support for an external user is required. > The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to > use the

Re: [PATCH 03/10] vfio: add external user support

2013-08-05 Thread Alex Williamson
On Tue, 2013-07-23 at 19:07 +1000, Alexey Kardashevskiy wrote: > On 07/23/2013 12:23 PM, Alex Williamson wrote: > > On Tue, 2013-07-16 at 10:53 +1000, Alexey Kardashevskiy wrote: > >> VFIO is designed to be used via ioctls on file descriptors > >> returned by VFIO

Re: [PATCH 2/2] powerpc/iommu: check dev->iommu_group before remove a device from iommu_group

2013-08-22 Thread Alex Williamson
On Thu, 2013-08-22 at 15:52 +0800, Wei Yang wrote: > On Thu, Aug 22, 2013 at 05:23:34PM +1000, Alexey Kardashevskiy wrote: > >On 08/19/2013 11:55 AM, Wei Yang wrote: > >> On Mon, Aug 19, 2013 at 11:39:49AM +1000, Alexey Kardashevskiy wrote: > >>> On 08/19/2013 11:29 AM, Wei Yang wrote: > On Fr

Re: [PATCH 2/2] powerpc/iommu: check dev->iommu_group before remove a device from iommu_group

2013-08-22 Thread Alex Williamson
On Thu, 2013-08-22 at 23:41 +0800, Wei Yang wrote: > On Thu, Aug 22, 2013 at 09:28:23AM -0600, Alex Williamson wrote: > >On Thu, 2013-08-22 at 15:52 +0800, Wei Yang wrote: > >> On Thu, Aug 22, 2013 at 05:23:34PM +1000, Alexey Kardashevskiy wrote: > >> >On 08/19

Re: [PATCH] iommu: WARN_ON when removing a device with no iommu_group associated

2013-08-22 Thread Alex Williamson
set to NULL, kernel will crash. > > This patch gives a warning and return when trying to remove a device from an > iommu_group with dev->iommu_group set to NULL. This helps to indicate some bad > behavior and also guard the kernel. > > Signed-off-by: Wei Yang Acked-by: Alex Williams

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 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 6/7] vfio: moving some functions in common file

2013-09-25 Thread Alex Williamson
0644 > index 000..8bdc0ea > --- /dev/null > +++ b/drivers/vfio/vfio_iommu_common.c > @@ -0,0 +1,235 @@ > +/* > + * VFIO: Common code for vfio IOMMU support > + * > + * Copyright (C) 2012 Red Hat, Inc. All rights reserved. > + * Author: Alex Williamson > + *

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 2/7] iommu: add api to get iommu_domain of a device

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 09:54 +, Bhushan Bharat-R65777 wrote: > > > -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:16

Re: [RFC PATCH] PPC: KVM: vfio kvm device: support spapr tce

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 22:24 +1000, Alexey Kardashevskiy wrote: > This is a very rough change set required for ppc64 to use this KVM device. > > vfio_rm.c is a piece of code which is going to be called from the realmode > (MMU off), > and I will put everything spapr-related under #ifdef CONFIG_SPA

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

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 16:47 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, October 04, 2013 9:15 PM > > To: Bhushan Bharat-R65777 > > Cc: j...@8bytes.

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

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 17:23 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, October 04, 2013 10:43 PM > > To: Bhushan Bharat-R65777 > > Cc: j...@8bytes.

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

2013-10-07 Thread Alex Williamson
On Mon, 2013-10-07 at 05:46 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, October 04, 2013 11:42 PM > > To: Bhushan Bharat-R65777 > > Cc: j...@8bytes.

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

2013-10-10 Thread Alex Williamson
On Thu, 2013-10-10 at 20:09 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > > boun...@lists.linux-foundation.org] On Behalf Of Alex Williamson > > Sent: Tuesday, October 08, 2013 8:4

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

2013-10-14 Thread Alex Williamson
On Mon, 2013-10-14 at 12:58 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, October 11, 2013 2:12 AM > > To: Sethi Varun-B16395 > > Cc: Bhushan Bharat-R65777; ag...@

Re: [RFC PATCH v2] KVM: PPC: vfio kvm device: support spapr tce

2013-11-05 Thread Alex Williamson
On Tue, 2013-11-05 at 19:05 +1100, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy > --- > > Changes: > v2: > * it does not try to introduce a realmode search function. > Instead, liobn-to-iommu-group lookup is done by VFIO KVM device > in virtual mode and the result (iommu_grou

Re: [PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-12-07 Thread Alex Williamson
> + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * Derived from original vfio_iommu_type1.c: > + * Copyright (C) 2012 Red Hat, Inc. All rights reserved. > + * Author: Alex Williamson > + */

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-07 Thread Alex Williamson
On Fri, 2012-12-07 at 18:35 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alex Williamson
On Wed, 2012-12-12 at 17:14 +1100, Alexey Kardashevskiy wrote: > On 08/12/12 04:38, Alex Williamson wrote: > >> +static int __init tce_iommu_init(void) > >> +{ > >> + struct pci_dev *pdev = NULL; > >> + struct iommu_table *tbl; > >> + struct

Re: [PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-12-12 Thread Alex Williamson
On Wed, 2012-12-12 at 17:59 +1100, Alexey Kardashevskiy wrote: > On 08/12/12 04:01, Alex Williamson wrote: > >> + case VFIO_IOMMU_MAP_DMA: { > >> + vfio_iommu_spapr_tce_dma_map param; > >> + struct iommu_table *tbl = container->tbl; > &

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alex Williamson
On Wed, 2012-12-12 at 23:34 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alex Williamson
On Thu, 2012-12-13 at 13:57 +1100, Benjamin Herrenschmidt wrote: > On Wed, 2012-12-12 at 16:30 -0700, Alex Williamson wrote: > > Locked page accounting in this version is very, very broken. How do > > powerpc folks feel about seemingly generic kernel iommu interfaces > > mes

Re: [PATCH 1/2] vfio powerpc: enabled on powernv platform

2013-02-11 Thread Alex Williamson
On Mon, 2013-02-11 at 22:54 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

Re: [PATCH 2/2] vfio powerpc: implemented IOMMU driver for VFIO

2013-02-11 Thread Alex Williamson
ogram is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * Derived from original vfio_iommu_type1.c: > + * Copyright (C) 2012 Red Hat, Inc. All rights reserved

Re: [PATCH 1/2] vfio powerpc: enabled on powernv platform

2013-02-11 Thread Alex Williamson
On Tue, 2013-02-12 at 10:19 +1100, Alexey Kardashevskiy wrote: > On 12/02/13 09:16, Alex Williamson wrote: > > On Mon, 2013-02-11 at 22:54 +1100, Alexey Kardashevskiy wrote: > >> @@ -707,11 +709,39 @@ struct iommu_table *iommu_init_table(struct > >> iommu_table *tbl,

Re: [PATCH 2/2] vfio powerpc: implemented IOMMU driver for VFIO

2013-02-11 Thread Alex Williamson
On Tue, 2013-02-12 at 10:45 +1100, Alexey Kardashevskiy wrote: > On 12/02/13 09:17, Alex Williamson wrote: > > On Mon, 2013-02-11 at 22:54 +1100, Alexey Kardashevskiy wrote: > >> VFIO implements platform independent stuff such as > >> a PCI driver, BAR access (via read

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-15 Thread Alex Williamson
On Fri, 2013-03-15 at 15:26 +0800, Gavin Shan wrote: > The address (domain/bus/slot/function) of the passed PCI device > looks quite different from perspective of host and guest. Some > architectures like PPC need to setup the mapping in host. The patch > introduces additional VFIO device IOCTL com

Re: [PATCH 3/3] VFIO: Direct access config reg without capability

2013-03-15 Thread Alex Williamson
On Fri, 2013-03-15 at 15:26 +0800, Gavin Shan wrote: > The config registers in [0, 0x40] is being supported by VFIO. Apart > from that, the other config registers should be coverred by PCI or > PCIe capability. However, there might have some PCI devices (be2net) > who has config registers (0x7c) ou

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Alex Williamson
On Sat, 2013-03-16 at 06:37 +0100, Benjamin Herrenschmidt wrote: > On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: > > >Could you explain further how this will be used? How the device is > > >exposed to a guest is entirely a userspace construct, so why does vfio > > >need to know or care abou

Re: [PATCH 3/3] VFIO: Direct access config reg without capability

2013-03-18 Thread Alex Williamson
On Sat, 2013-03-16 at 06:30 +0100, Benjamin Herrenschmidt wrote: > On Fri, 2013-03-15 at 13:41 -0600, Alex Williamson wrote: > > > > This basically gives userspace free access to any regions that aren't > > covered by known capabilities. > > And ? > > I

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Alex Williamson
On Tue, 2013-03-19 at 11:24 +0800, Gavin Shan wrote: > On Mon, Mar 18, 2013 at 03:01:14PM -0600, Alex Williamson wrote: > >On Sat, 2013-03-16 at 06:37 +0100, Benjamin Herrenschmidt wrote: > >> On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: > >> > >Could you

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Alex Williamson
On Tue, 2013-03-19 at 05:45 +0100, Benjamin Herrenschmidt wrote: > On Mon, 2013-03-18 at 22:18 -0600, Alex Williamson wrote: > > > Yes, EEH firmware call needn't going through VFIO. However, EEH has > > > very close relationship with PCI and so VFIO-PCI does. Event

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Alex Williamson
On Wed, 2013-03-20 at 20:31 +0100, Benjamin Herrenschmidt wrote: > On Wed, 2013-03-20 at 12:48 -0600, Alex Williamson wrote: > > Perhaps my problem is that I don't have a clear picture of where > > you're > > going with this like I do for AER. For AER we're

Re: [PATCH 3/3] VFIO: Direct access config reg without capability

2013-03-20 Thread Alex Williamson
On Fri, 2013-03-15 at 15:26 +0800, Gavin Shan wrote: > The config registers in [0, 0x40] is being supported by VFIO. Apart > from that, the other config registers should be coverred by PCI or > PCIe capability. However, there might have some PCI devices (be2net) > who has config registers (0x7c) ou

Re: [PATCH 5/5 v11] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-04-03 Thread Alex Williamson
On Tue, 2013-04-02 at 18:18 +0200, Joerg Roedel wrote: > Cc'ing Alex Williamson > > Alex, can you please review the iommu-group part of this patch? Sure, it looks pretty reasonable. AIUI, all PCI devices are below some kind of host bridge that is either new and supports partition

Re: [PATCH 5/5 v11] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-04-04 Thread Alex Williamson
On Thu, 2013-04-04 at 13:00 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, April 03, 2013 11:32 PM > > To: Joerg Roedel > > Cc: Sethi Varun-B16395; Yoder Stuart-

Re: [PATCH 5/5 v11] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-04-04 Thread Alex Williamson
On Thu, 2013-04-04 at 16:35 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, April 04, 2013 8:52 PM > > To: Sethi Varun-B16395 > > Cc: Joerg Roedel; Yoder Stuart-

Re: [PATCH RFC 00/22] EEH Support for VFIO PCI devices on PowerKVM guest

2014-05-05 Thread Alex Williamson
On Mon, 2014-05-05 at 13:56 +0200, Alexander Graf wrote: > On 05/05/2014 03:27 AM, Gavin Shan wrote: > > The series of patches intends to support EEH for PCI devices, which have > > been > > passed through to PowerKVM based guest via VFIO. The implementation is > > straightforward based on the iss

Re: [PATCH 3/8] drivers/vfio: New IOCTL command VFIO_EEH_INFO

2014-05-19 Thread Alex Williamson
On Wed, 2014-05-14 at 14:11 +1000, Gavin Shan wrote: > The patch adds new IOCTL command VFIO_EEH_INFO to VFIO container > to support EEH functionality for PCI devices, which have been > passed from host to guest via VFIO. Some comments throughout, but overall this seems to forgo every bit of the d

Re: [PATCH 3/8] drivers/vfio: New IOCTL command VFIO_EEH_INFO

2014-05-19 Thread Alex Williamson
On Tue, 2014-05-20 at 10:22 +1000, Gavin Shan wrote: > On Mon, May 19, 2014 at 04:33:10PM -0600, Alex Williamson wrote: > >On Wed, 2014-05-14 at 14:11 +1000, Gavin Shan wrote: > >> The patch adds new IOCTL command VFIO_EEH_INFO to VFIO container > >> to support EEH fu

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Alex Williamson
On Thu, 2014-05-22 at 18:23 +1000, Gavin Shan wrote: > The patch adds new IOCTL commands for VFIO PCI device to support > EEH functionality for PCI devices, which have been passed through > from host to somebody else via VFIO. > > Signed-off-by: Gavin Shan > --- > Documentation/vfio.txt

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Alex Williamson
On Fri, 2014-05-23 at 10:37 +1000, Gavin Shan wrote: > On Fri, May 23, 2014 at 10:17:30AM +1000, Gavin Shan wrote: > >On Thu, May 22, 2014 at 11:55:29AM +0200, Alexander Graf wrote: > >>On 22.05.14 10:23, Gavin Shan wrote: > > .../... > > >>>diff --git a/include/uapi/linux/vfio.h b/include/uapi/l

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-23 Thread Alex Williamson
On Fri, 2014-05-23 at 08:52 +0200, Alexander Graf wrote: > > > Am 23.05.2014 um 05:23 schrieb Alex Williamson : > > > >> On Fri, 2014-05-23 at 10:37 +1000, Gavin Shan wrote: > >>> On Fri, May 23, 2014 at 10:17:30AM +1000, Gavin Shan wrote: > >&g

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-23 Thread Alex Williamson
On Fri, 2014-05-23 at 14:37 +1000, Gavin Shan wrote: > On Thu, May 22, 2014 at 09:10:53PM -0600, Alex Williamson wrote: > >On Thu, 2014-05-22 at 18:23 +1000, Gavin Shan wrote: > >> The patch adds new IOCTL commands for VFIO PCI device to support > >> EEH functionality

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-23 Thread Alex Williamson
On Fri, 2014-05-23 at 15:00 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2014-05-23 at 14:37 +1000, Gavin Shan wrote: > > >There's no notification, the user needs to observe the return value an > > >poll? Should we be enabling an eventfd to notify the user of the state > > >change? > > > > > >

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-23 Thread Alex Williamson
On Fri, 2014-05-23 at 14:30 +0200, Alexander Graf wrote: > On 23.05.14 13:58, Gavin Shan wrote: > > On Fri, May 23, 2014 at 08:52:23AM +0200, Alexander Graf wrote: > >> > >>> Am 23.05.2014 um 05:23 schrieb Alex Williamson > >>> : > >>> >

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Sat, 2014-05-24 at 12:06 +1000, Gavin Shan wrote: > On Fri, May 23, 2014 at 08:29:59AM -0600, Alex Williamson wrote: > >On Fri, 2014-05-23 at 14:37 +1000, Gavin Shan wrote: > >> On Thu, May 22, 2014 at 09:10:53PM -0600, Alex Williamson wrote: > >> >On Thu, 2014-05

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wrote: > The patch adds new IOCTL commands for sPAPR VFIO container device > to support EEH functionality for PCI devices, which have been passed > through from host to somebody else via VFIO. > > Signed-off-by: Gavin Shan > --- > Documentation/vfio.

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 06:30 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2014-05-27 at 12:15 -0600, Alex Williamson wrote: > > > > +/* > > > + * Reset is the major step to recover problematic PE. The following > > > + * command helps on that. > >

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 00:49 +0200, Alexander Graf wrote: > On 27.05.14 20:15, Alex Williamson wrote: > > On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wrote: > >> The patch adds new IOCTL commands for sPAPR VFIO container device > >> to support EEH functionality for P

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 02:44 +0200, Alexander Graf wrote: > On 28.05.14 02:39, Alex Williamson wrote: > > On Wed, 2014-05-28 at 00:49 +0200, Alexander Graf wrote: > >> On 27.05.14 20:15, Alex Williamson wrote: > >>> On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wr

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-28 Thread Alex Williamson
On Wed, 2014-05-28 at 13:37 +0200, Alexander Graf wrote: > On 28.05.14 02:57, Alex Williamson wrote: > > On Wed, 2014-05-28 at 02:44 +0200, Alexander Graf wrote: > >> On 28.05.14 02:39, Alex Williamson wrote: > >>> On Wed, 2014-05-28 at 00:49 +0200, Alexander Graf w

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-28 Thread Alex Williamson
On Wed, 2014-05-28 at 10:55 +1000, Gavin Shan wrote: > On Tue, May 27, 2014 at 12:15:27PM -0600, Alex Williamson wrote: > >On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wrote: > >> The patch adds new IOCTL commands for sPAPR VFIO container device > >> to support EEH fu

Re: [PATCH v8 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-06-05 Thread Alex Williamson
On Thu, 2014-06-05 at 16:36 +1000, Gavin Shan wrote: > The patch adds new IOCTL commands for sPAPR VFIO container device > to support EEH functionality for PCI devices, which have been passed > through from host to somebody else via VFIO. > > Signed-off-by: Gavin Shan > --- > Documentation/vfio.

  1   2   3   4   >