[PATCH] powerpc: added DSCR support to ptrace

2012-10-15 Thread Alexey Kardashevskiy
. The patch adds new register index PT_DSCR (index=44) which can be set/get by: ptrace(PTRACE_POKEUSER, traced_process, PT_DSCR 3, dscr); dscr = ptrace(PTRACE_PEEKUSER, traced_process, PT_DSCR 3, NULL); Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/ptrace.h |3

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-03-17 Thread Alexey Kardashevskiy
On 20/02/13 15:33, Alex Williamson wrote: On Wed, 2013-02-20 at 15:20 +1100, Alexey Kardashevskiy wrote: On 20/02/13 14:47, Alex Williamson wrote: On Wed, 2013-02-20 at 13:31 +1100, Alexey Kardashevskiy wrote: On 20/02/13 07:11, Alex Williamson wrote: On Tue, 2013-02-19 at 18:38 +1100, David

[PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-19 Thread Alexey Kardashevskiy
* various locks fixed Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Documentation/vfio.txt | 63 ++ drivers/vfio/Kconfig|6 + drivers/vfio/Makefile |1 + drivers/vfio/vfio.c

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

2013-03-20 Thread Alexey Kardashevskiy
On 21/03/13 07:45, Alex Williamson wrote: On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent

[PATCH] iommu: add a function to find an iommu group by id

2013-03-21 Thread Alexey Kardashevskiy
in order to support in-kernel handling of DMA map/unmap requests. The patch adds the iommu_group_find(id) function which performs such search. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/iommu/iommu.c | 26 ++ include/linux/iommu.h |1 + 2 files

[PATCH] iommu: add a function to find an iommu group by id

2013-03-22 Thread Alexey Kardashevskiy
in order to support in-kernel handling of DMA map/unmap requests. The patch adds the iommu_group_get_by_id(id) function which performs such search. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/iommu/iommu.c | 28 include/linux/iommu.h |1 + 2

[PATCH] iommu: add a function to find an iommu group by id

2013-03-24 Thread Alexey Kardashevskiy
in order to support in-kernel handling of DMA map/unmap requests. The patch adds the iommu_group_get_by_id(id) function which performs such search. v2: fixed reference counting. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/iommu/iommu.c | 29

[PATCH] vfio powerpc: enabled on powernv platform

2012-11-29 Thread Alexey Kardashevskiy
SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h |9 ++ arch/powerpc/kernel/iommu.c | 186 ++ arch/powerpc

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

2012-11-29 Thread Alexey Kardashevskiy
On 29/11/12 15:20, Alex Williamson wrote: + /* Put tces to the table */ + for (i = 0; (i pages) !ret; ++i, tce += IOMMU_PAGE_SIZE) { + ret = put_tce(tbl, entry + i, tce, direction); + /* +* As IOMMU page size is always 4K, the system

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

2012-11-30 Thread Alexey Kardashevskiy
On 01/12/12 03:48, Alex Williamson wrote: On Fri, 2012-11-30 at 17:14 +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

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

2012-12-02 Thread Alexey Kardashevskiy
SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h |9 ++ arch/powerpc/kernel/iommu.c | 186 ++ arch/powerpc

[PATCH 0/2] vfio on power: yet another try

2012-12-02 Thread Alexey Kardashevskiy
) but have not decided about its actual design yet. Alexey Kardashevskiy (2): vfio powerpc: enabled on powernv platform vfio powerpc: implemented IOMMU driver for VFIO arch/powerpc/include/asm/iommu.h |9 + arch/powerpc/kernel/iommu.c | 186 ++ arch/powerpc

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

2012-12-02 Thread Alexey Kardashevskiy
mapping/unmapping pages for the guest IO and provides information about DMA window (required by a POWERPC guest). The counterpart in QEMU is required to support this functionality. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/vfio

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

2012-12-04 Thread Alexey Kardashevskiy
On 04/12/12 04:35, Alex Williamson wrote: On Mon, 2012-12-03 at 13:52 +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

[PATCH] iommu: adding missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-02-10 Thread Alexey Kardashevskiy
, the empty kvm_iommu_map_pages/kvm_iommu_unmap_pages have to be defined, so does the patch. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Cc: David Gibson da...@gibson.dropbear.id.au --- arch/powerpc/kernel/iommu.c | 17 + 1 file changed, 17 insertions(+) diff --git a/arch

[PATCH 0/2] vfio on power

2013-02-11 Thread Alexey Kardashevskiy
The series introduces a VFIO support on POWER. The QEMU support is required, the real mode acceleration patches are coming later. Alexey Kardashevskiy (2): vfio powerpc: enabled on powernv platform vfio powerpc: implemented IOMMU driver for VFIO arch/powerpc/include/asm/iommu.h

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

2013-02-11 Thread Alexey Kardashevskiy
VFIO on POWER, enable SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h| 15 ++ arch/powerpc/kernel/iommu.c | 343

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

2013-02-11 Thread Alexey Kardashevskiy
mapping/unmapping pages for the guest IO and provides information about DMA window (required by a POWERPC guest). The counterpart in QEMU is required to support this functionality. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/vfio

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

2013-02-11 Thread Alexey Kardashevskiy
On 12/02/13 09:16, Alex Williamson wrote: 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

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

2013-02-11 Thread Alexey Kardashevskiy
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/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent

[PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-11 Thread Alexey Kardashevskiy
-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/iommu/iommu.c | 19 ++- include/linux/iommu.h | 20 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b0afd3d..58cc298 100644 --- a/drivers/iommu

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-12 Thread Alexey Kardashevskiy
On 12/02/13 16:07, Alex Williamson wrote: On Tue, 2013-02-12 at 15:06 +1100, Alexey Kardashevskiy wrote: Having this patch in a tree, adding new nodes in sysfs for IOMMU groups is going to be easier. The first candidate for this change is a dma-window-size property which tells a size of a DMA

Re: [PATCH 1/6 v8] iommu/fsl: Store iommu domain information pointer in archdata.

2013-02-28 Thread Alexey Kardashevskiy
Hi! On POWERNV we use only the part of IOMMU API which handles devices and groups. We do not use IOMMU domains as VFIO containers do everything we need for VFIO and we do not implement iommu_ops as it is not very relevant to our architecture (does not give dma window properties, etc). So

Re: [PATCH 1/6 v8] iommu/fsl: Store iommu domain information pointer in archdata.

2013-03-01 Thread Alexey Kardashevskiy
. Regards Varun -Original Message- From: Alexey Kardashevskiy [mailto:a...@ozlabs.ru] Sent: Friday, March 01, 2013 6:55 AM To: Kumar Gala Cc: Sethi Varun-B16395; Benjamin Herrenschmidt; iommu@lists.linux- foundation.org; linuxppc-...@lists.ozlabs.org list; linux- ker...@vger.kernel.org list

[PATCH] powerpc: fixing ptrace_get_reg to return an error

2013-02-14 Thread Alexey Kardashevskiy
not been changed by this patch. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/ptrace.h |3 ++- arch/powerpc/kernel/ptrace.c | 29 ++--- arch/powerpc/kernel/ptrace32.c| 15 --- 3 files changed, 32 insertions(+), 15

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-17 Thread Alexey Kardashevskiy
On 13/02/13 04:15, Alex Williamson wrote: On Wed, 2013-02-13 at 01:42 +1100, Alexey Kardashevskiy wrote: On 12/02/13 16:07, Alex Williamson wrote: On Tue, 2013-02-12 at 15:06 +1100, Alexey Kardashevskiy wrote: Having this patch in a tree, adding new nodes in sysfs for IOMMU groups is going

Re: [PATCH 2/4] powerpc kvm: added multiple TCEs requests support

2013-02-18 Thread Alexey Kardashevskiy
On 15/02/13 14:24, Paul Mackerras wrote: On Mon, Feb 11, 2013 at 11:12:41PM +1100, a...@ozlabs.ru wrote: +static long emulated_h_put_tce(struct kvmppc_spapr_tce_table *stt, + unsigned long ioba, unsigned long tce) +{ + unsigned long idx = ioba SPAPR_TCE_SHIFT; +

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-18 Thread Alexey Kardashevskiy
On 19/02/13 16:24, Alex Williamson wrote: On Mon, 2013-02-18 at 17:15 +1100, Alexey Kardashevskiy wrote: On 13/02/13 04:15, Alex Williamson wrote: On Wed, 2013-02-13 at 01:42 +1100, Alexey Kardashevskiy wrote: On 12/02/13 16:07, Alex Williamson wrote: On Tue, 2013-02-12 at 15:06 +1100

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-19 Thread Alexey Kardashevskiy
On 20/02/13 07:11, Alex Williamson wrote: On Tue, 2013-02-19 at 18:38 +1100, David Gibson wrote: On Mon, Feb 18, 2013 at 10:24:00PM -0700, Alex Williamson wrote: On Mon, 2013-02-18 at 17:15 +1100, Alexey Kardashevskiy wrote: On 13/02/13 04:15, Alex Williamson wrote: On Wed, 2013-02-13 at 01

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-19 Thread Alexey Kardashevskiy
On 20/02/13 14:47, Alex Williamson wrote: On Wed, 2013-02-20 at 13:31 +1100, Alexey Kardashevskiy wrote: On 20/02/13 07:11, Alex Williamson wrote: On Tue, 2013-02-19 at 18:38 +1100, David Gibson wrote: On Mon, Feb 18, 2013 at 10:24:00PM -0700, Alex Williamson wrote: On Mon, 2013-02-18 at 17

how to implement platform specific per process parameter?

2012-08-05 Thread Alexey Kardashevskiy
Hi! There is a per core register on modern POWER processors (POWER6+) called DSCR: The DSCR (aka Data Stream Control Register) is supported on some server PowerPC chips and allow some control over the prefetch of data streams. Its per process support has been added by

[PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-12-06 Thread Alexey Kardashevskiy
mapping/unmapping pages for the guest IO and provides information about DMA window (required by a POWERPC guest). The counterpart in QEMU is required to support this functionality. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/vfio

[PATCH] vfio powerpc: enabled on powernv platform

2012-12-06 Thread Alexey Kardashevskiy
SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h | 10 ++ arch/powerpc/kernel/iommu.c | 214 ++ arch/powerpc

[PATCH] vfio powerpc: enabled and supported on powernv platform

2012-11-19 Thread Alexey Kardashevskiy
tree for a guest OS properly. Although this driver has been tested only on POWERNV, it should work on any platform supporting TCE tables. To enable VFIO on POWER, enable SPAPR_TCE_IOMMU config option. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru

Re: [PATCH] powerpc: added DSCR support to ptrace

2012-11-19 Thread Alexey Kardashevskiy
Ping? On 15/10/12 17:18, Alexey Kardashevskiy wrote: The DSCR (aka Data Stream Control Register) is supported on some server PowerPC chips and allow some control over the prefetch of data streams. The kernel already supports DSCR value per thread but there is also a need in a ability to change

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

2012-11-22 Thread Alexey Kardashevskiy
On 22/11/12 22:56, Sethi Varun-B16395 wrote: -Original Message- From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- ow...@vger.kernel.org] On Behalf Of Alex Williamson Sent: Tuesday, November 20, 2012 11:50 PM To: Alexey Kardashevskiy Cc: Benjamin Herrenschmidt; Paul

[PATCH] powerpc/pseries: Fix kernel crash caused by NULL PE

2012-11-22 Thread Alexey Kardashevskiy
device tree node. Otherwise, it would cause kernel crash. Actually, it was introduced by commit 66523d9f (powerpc/eeh: Trace error based on PE from beginning). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/pseries

[PATCH] powerpc/pseries: Fix kernel crash caused by NULL PE

2012-11-22 Thread Alexey Kardashevskiy
. So we shouldn't try to get the PE's device tree node. Otherwise, it would cause kernel crash. Actually, it was introduced by commit 66523d9f (powerpc/eeh: Trace error based on PE from beginning). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Gavin Shan sha

[PATCH 0/2] vfio powerpc: implemented and enabled

2012-11-23 Thread Alexey Kardashevskiy
The series includes IOMMU implementation and necessary IOMMU groups initialization. Alexey Kardashevskiy (2): vfio powerpc: implemented IOMMU driver for VFIO vfio powerpc: enabled on powernv platform arch/powerpc/include/asm/iommu.h |6 + arch/powerpc/kernel/iommu.c | 141

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

2012-11-23 Thread Alexey Kardashevskiy
mapping/unmapping pages for the guest IO and provides information about DMA window (required by a POWERPC guest). The counterpart in QEMU is required to support this functionality. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/vfio

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

2012-11-23 Thread Alexey Kardashevskiy
SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h |6 ++ arch/powerpc/kernel/iommu.c | 141 ++ arch/powerpc

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

2012-11-26 Thread Alexey Kardashevskiy
On 27/11/12 05:04, Alex Williamson wrote: On Mon, 2012-11-26 at 08:18 -0700, Alex Williamson wrote: On Fri, 2012-11-23 at 13:02 +1100, Alexey Kardashevskiy wrote: On 22/11/12 22:56, Sethi Varun-B16395 wrote: -Original Message- From: linux-kernel-ow...@vger.kernel.org [mailto:linux

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

2012-11-26 Thread Alexey Kardashevskiy
On 27/11/12 05:20, Alex Williamson wrote: On Fri, 2012-11-23 at 20:03 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent

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

2012-11-26 Thread Alexey Kardashevskiy
On 27/11/12 15:29, Alex Williamson wrote: On Tue, 2012-11-27 at 15:06 +1100, Alexey Kardashevskiy wrote: On 27/11/12 05:20, Alex Williamson wrote: On Fri, 2012-11-23 at 20:03 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via

[PATCH] vfio powerpc: enabled on powernv platform

2012-11-27 Thread Alexey Kardashevskiy
SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h |9 +++ arch/powerpc/kernel/iommu.c | 147 ++ arch/powerpc

[PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-27 Thread Alexey Kardashevskiy
mapping/unmapping pages for the guest IO and provides information about DMA window (required by a POWERPC guest). The counterpart in QEMU is required to support this functionality. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/vfio

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

2012-11-28 Thread Alexey Kardashevskiy
On 29/11/12 08:01, Alex Williamson wrote: On Wed, 2012-11-28 at 18:21 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent

[PATCH] vfio powerpc: enabled on powernv platform

2012-11-28 Thread Alexey Kardashevskiy
SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h |9 ++ arch/powerpc/kernel/iommu.c | 159 ++ arch/powerpc

Re: [PATCH] iommu: moving initialization earlier

2013-01-04 Thread Alexey Kardashevskiy
On 16/12/12 22:20, Joerg Roedel wrote: Alexey, On Thu, Dec 13, 2012 at 08:48:55AM -0700, Alex Williamson wrote: Probably a good idea to CC the iommu list and maintainer... On Thu, 2012-12-13 at 17:28 +1100, Alexey Kardashevskiy wrote: Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru

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

2012-12-11 Thread Alexey Kardashevskiy
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 iommu_group *grp; + + /* Allocate and initialize IOMMU groups */ + for_each_pci_dev(pdev) { + tbl =

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

2012-12-11 Thread Alexey Kardashevskiy
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; + enum dma_data_direction direction; + unsigned long locked, lock_limit; + +

[PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alexey Kardashevskiy
SPAPR_TCE_IOMMU config option and configure VFIO as required. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h | 10 ++ arch/powerpc/kernel/iommu.c | 329 ++ arch/powerpc

[PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-12-12 Thread Alexey Kardashevskiy
mapping/unmapping pages for the guest IO and provides information about DMA window (required by a POWERPC guest). The counterpart in QEMU is required to support this functionality. Cc: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/vfio

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

2012-12-12 Thread Alexey Kardashevskiy
. On 12/12/12 23:34, 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 also implements an API

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

2012-12-12 Thread Alexey Kardashevskiy
On 13/12/12 10:30, Alex Williamson wrote: 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

[PATCH] powerpc: added DSCR support to ptrace

2012-12-12 Thread Alexey Kardashevskiy
. The patch adds new register index PT_DSCR (index=44) which can be set/get by: ptrace(PTRACE_POKEUSER, traced_process, PT_DSCR 3, dscr); dscr = ptrace(PTRACE_PEEKUSER, traced_process, PT_DSCR 3, NULL); Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/ptrace.h |1

[PATCH] powerpc: added DSCR support to ptrace

2012-12-12 Thread Alexey Kardashevskiy
. The patch adds new register index PT_DSCR (index=44) which can be set/get by: ptrace(PTRACE_POKEUSER, traced_process, PT_DSCR 3, dscr); dscr = ptrace(PTRACE_PEEKUSER, traced_process, PT_DSCR 3, NULL); Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/ptrace.h |1

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

2012-12-12 Thread Alexey Kardashevskiy
On 13/12/12 13:29, Benjamin Herrenschmidt wrote: On Wed, 2012-12-12 at 07:34 -0700, Alex Williamson wrote: But what would I put there?... IOMMU ID is more than enough at the moment and struct iommu_table does not have anything what would have made sense to show in the sysfs... I believe David

[PATCH] iommu: moving initialization earlier

2012-12-12 Thread Alexey Kardashevskiy
place to call iommu_group_alloc() is when a new group is just discovered. However PCI scan is done from subsys_initcall hook as well what makes using of the IOMMU API impossible. The patch moves IOMMU subsystem initialization one step earlier. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru

[PATCH] powerpc: added DSCR support to ptrace

2013-01-10 Thread Alexey Kardashevskiy
. The patch adds new register index PT_DSCR (index=44) which can be set/get by: ptrace(PTRACE_POKEUSER, traced_process, PT_DSCR 3, dscr); dscr = ptrace(PTRACE_PEEKUSER, traced_process, PT_DSCR 3, NULL); Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/ptrace.h |3

[PATCH] powerpc: added DSCR support to ptrace

2013-01-10 Thread Alexey Kardashevskiy
-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/uapi/asm/ptrace.h |1 + arch/powerpc/kernel/ptrace.c | 29 + 2 files changed, 30 insertions(+) diff --git a/arch/powerpc/include/uapi/asm/ptrace.h b/arch/powerpc/include/uapi/asm

[PATCH] iommu: moving initialization earlier

2013-01-06 Thread Alexey Kardashevskiy
before PCI scan begins. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/iommu/iommu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index ddbdaca..1065a1a 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu

BUG cxgb3: Check and handle the dma mapping errors

2013-08-04 Thread Alexey Kardashevskiy
Hi! Recently I started getting multiple errors like this: cxgb3 0006:01:00.0: iommu_alloc failed, tbl c3067980 vaddr c01fbdaaa882 npages 1 cxgb3 0006:01:00.0: iommu_alloc failed, tbl c3067980 vaddr c01fbdaaa882 npages 1 cxgb3 0006:01:00.0: iommu_alloc failed, tbl

Re: BUG cxgb3: Check and handle the dma mapping errors

2013-08-05 Thread Alexey Kardashevskiy
On 08/06/2013 04:41 AM, Jay Fenlason wrote: On Mon, Aug 05, 2013 at 12:59:04PM +1000, Alexey Kardashevskiy wrote: Hi! Recently I started getting multiple errors like this: cxgb3 0006:01:00.0: iommu_alloc failed, tbl c3067980 vaddr c01fbdaaa882 npages 1 cxgb3 0006:01:00.0

[PATCH] powerpc: Prepare to support kernel handling of IOMMU map/unmap

2013-07-25 Thread Alexey Kardashevskiy
in realmode_get_page() and realmode_put_page() Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/pgtable-ppc64.h | 2 ++ arch/powerpc/mm/init_64.c| 54 +++- include/linux/mm.h | 14 + include/linux/page

Re: [PATCH] powerpc: Prepare to support kernel handling of IOMMU map/unmap

2013-07-25 Thread Alexey Kardashevskiy
On 07/25/2013 08:26 PM, Alexey Kardashevskiy wrote: The current VFIO-on-POWER implementation supports only user mode driven mapping, i.e. QEMU is sending requests to map/unmap pages. However this approach is really slow, so we want to move that to KVM. Since H_PUT_TCE can be extremely

Re: [PATCH v8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-27 Thread Alexey Kardashevskiy
On 08/27/2013 05:56 PM, Gleb Natapov wrote: On Thu, Aug 15, 2013 at 05:49:26PM +1000, Alexey Kardashevskiy wrote: This is to reserve a capablity number for upcoming support of VFIO-IOMMU DMA operations in real mode. The last ioctl in the group which KVM_CREATE_SPAPR_TCE_IOMMU is added

Re: [PATCH v8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-27 Thread Alexey Kardashevskiy
On 08/27/2013 08:58 PM, Gleb Natapov wrote: On Tue, Aug 27, 2013 at 06:42:18PM +1000, Alexey Kardashevskiy wrote: On 08/27/2013 05:56 PM, Gleb Natapov wrote: On Thu, Aug 15, 2013 at 05:49:26PM +1000, Alexey Kardashevskiy wrote: This is to reserve a capablity number for upcoming support

[PATCH v9 06/13] powerpc: add real mode support for dma operations on powernv

2013-08-28 Thread Alexey Kardashevskiy
instruction for TCE invalidation. This new feature is going to be utilized by real mode support of VFIO. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v8: * fixed check_patch.pl warnings 2013/11/07: * added comment why stdcix cannot be used in virtual mode 2013/08/07: * tested

[PATCH v9 00/13] KVM: PPC: IOMMU in-kernel handling of VFIO

2013-08-28 Thread Alexey Kardashevskiy
: add hash_for_each_possible_rcu_notrace(), Ben suggested to push it via his tree so I included it to the series. * realmode_(get|put)_page is reworked. More details in the individual patch comments. Alexey Kardashevskiy (13): KVM: PPC: POWERNV: move iommu_add_device earlier hashtable: add

[PATCH v9 02/13] hashtable: add hash_for_each_possible_rcu_notrace()

2013-08-28 Thread Alexey Kardashevskiy
This adds hash_for_each_possible_rcu_notrace() which is basically a notrace clone of hash_for_each_possible_rcu() which cannot be used in real mode due to its tracing/debugging capability. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v8: * fixed warnings from check_patch.pl

[PATCH v9 05/13] powerpc: Prepare to support kernel handling of IOMMU map/unmap

2013-08-28 Thread Alexey Kardashevskiy
-foundation.org Reviewed-by: Paul Mackerras pau...@samba.org Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: 2013/07/25 (v7): * removed realmode_put_page and added put_page_unless_one() instead. The name has been chosen to conform the already

[PATCH v9 08/13] KVM: PPC: Add support for multiple-TCE hcalls

2013-08-28 Thread Alexey Kardashevskiy
successfully in the kernel based fast path. If they can not be handled by the kernel, they will get passed on to user space. So user space still has to have an implementation for these despite the in kernel acceleration. Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Alexey Kardashevskiy

[PATCH v9 09/13] powerpc/iommu: rework to support realmode

2013-08-28 Thread Alexey Kardashevskiy
. iommu_tce_direction is static now as it is not called from anywhere else. This will be used by upcoming real mode support of VFIO on POWER. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v8: * fixed warnings from check_patch.pl --- arch/powerpc/include/asm/iommu.h | 9 +- arch

[PATCH v9 07/13] KVM: PPC: enable IOMMU_API for KVM_BOOK3S_64 permanently

2013-08-28 Thread Alexey Kardashevskiy
*. With those ifdef's we could have only user space emulated devices accelerated (but not VFIO) which do not seem to be very useful. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/Kconfig b/arch

[PATCH v9 04/13] KVM: PPC: reserve a capability and KVM device type for realmode VFIO

2013-08-28 Thread Alexey Kardashevskiy
to be used for initialization. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v9: * KVM ioctl is replaced with SPAPR TCE IOMMU KVM device type with KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE attribute 2013/08/15: * fixed mistype in comments * fixed commit message which says what uses

[PATCH v9 01/13] KVM: PPC: POWERNV: move iommu_add_device earlier

2013-08-28 Thread Alexey Kardashevskiy
() and iommu_del_device() are public now. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v8: * added the check for iommu_group!=NULL before removing device from a group as suggested by Wei Yang weiy...@linux.vnet.ibm.com v2: * added a helper - set_iommu_table_base_and_group - which does

[PATCH v9 03/13] KVM: PPC: reserve a capability number for multitce support

2013-08-28 Thread Alexey Kardashevskiy
This is to reserve a capablity number for upcoming support of H_PUT_TCE_INDIRECT and H_STUFF_TCE pseries hypercalls which support mulptiple DMA map/unmap operations per one call. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: 2013/07/16: * changed the number --- include/uapi

[PATCH v9 10/13] KVM: PPC: remove warning from kvmppc_core_destroy_vm

2013-08-28 Thread Alexey Kardashevskiy
in real life and there is no any obvious place to put it. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/kvm/book3s_hv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 9e823ad..5f15ff7 100644 --- a/arch

[PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-08-28 Thread Alexey Kardashevskiy
between KVM and VFIO. Tests show that this patch increases transmission speed from 220MB/s to 750..1020MB/s on 10Gb network (Chelsea CXGB3 10Gb ethernet card). Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v9

[PATCH v9 11/13] KVM: PPC: add trampolines for VFIO external API

2013-08-28 Thread Alexey Kardashevskiy
KVM is going to use VFIO's external API. However KVM can operate even VFIO is not compiled or loaded so KVM is linked to VFIO dynamically. This adds proxy functions for VFIO external API. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/kvm/book3s_64_vio.c | 49

[PATCH v9 13/13] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-08-28 Thread Alexey Kardashevskiy
. However this can change and we may want to optimize this. Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: 2013/07/12: * removed multiple #ifdef IOMMU_API as IOMMU_API is always enabled for KVM_BOOK3S_64 2013/06/27: * list of huge pages

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

2013-08-18 Thread Alexey Kardashevskiy
On 08/19/2013 11:29 AM, Wei Yang wrote: On Fri, Aug 16, 2013 at 08:15:36PM +1000, Alexey Kardashevskiy wrote: On 08/16/2013 08:08 PM, Wei Yang wrote: --- arch/powerpc/kernel/iommu.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/iommu.c b/arch

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

2013-08-22 Thread Alexey Kardashevskiy
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 Fri, Aug 16, 2013 at 08:15:36PM +1000, Alexey Kardashevskiy wrote: On 08/16/2013 08:08 PM, Wei Yang wrote: --- arch/powerpc/kernel/iommu.c

[PATCH] Revert cxgb3: Check and handle the dma mapping errors

2013-08-14 Thread Alexey Kardashevskiy
...@linux-foundation.org Cc: Santosh Rastapur sant...@chelsio.com Cc: Jay Fenlason fenla...@redhat.com Cc: David S. Miller da...@davemloft.net Cc: Divy Le ray d...@chelsio.com Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- drivers/net/ethernet/chelsio/cxgb3/sge.c | 107

[PATCH] KVM: PPC: POWERNV: move iommu_add_device earlier

2013-08-14 Thread Alexey Kardashevskiy
() and iommu_del_device() are public now. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/include/asm/iommu.h| 2 ++ arch/powerpc/kernel/iommu.c | 41 +++-- arch/powerpc/platforms/powernv/pci-ioda.c | 12 ++--- arch/powerpc/platforms/powernv

[PATCH v2] KVM: PPC: move iommu_add_device earlier

2013-08-14 Thread Alexey Kardashevskiy
driver. iommu_add_device() and iommu_del_device() are public now. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v2: * added a helper - set_iommu_table_base_and_group - which does set_iommu_table_base() and iommu_add_device() --- arch/powerpc/include/asm/iommu.h

Re: [PATCH 03/10] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-15 Thread Alexey Kardashevskiy
On 08/15/2013 05:16 PM, Alexander Graf wrote: On 01.08.2013, at 06:44, Alexey Kardashevskiy wrote: This is to reserve a capablity number for upcoming support of VFIO-IOMMU DMA operations in real mode. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: 2013/07/16

Re: [PATCH 03/10] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-15 Thread Alexey Kardashevskiy
On 08/15/2013 05:25 PM, Alexander Graf wrote: On 15.08.2013, at 09:24, Alexander Graf wrote: On 15.08.2013, at 09:22, Alexey Kardashevskiy wrote: On 08/15/2013 05:16 PM, Alexander Graf wrote: On 01.08.2013, at 06:44, Alexey Kardashevskiy wrote: This is to reserve a capablity number

[PATCH v8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-15 Thread Alexey Kardashevskiy
the KVM_CREATE_SPAPR_TCE_IOMMU ioclt gets 0xaf. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: 2013/08/15 v8: * fixed comment again 2013/08/15: * fixed mistype in comments * fixed commit message which says what uses ioctls 0xad and 0xae 2013/07/16: * changed the number 2013/07/11: * changed

Re: [PATCH 03/10] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-08-15 Thread Alexey Kardashevskiy
On 08/15/2013 05:43 PM, Alexander Graf wrote: On 15.08.2013, at 09:42, Alexey Kardashevskiy wrote: On 08/15/2013 05:25 PM, Alexander Graf wrote: On 15.08.2013, at 09:24, Alexander Graf wrote: On 15.08.2013, at 09:22, Alexey Kardashevskiy wrote: On 08/15/2013 05:16 PM, Alexander Graf

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

2013-08-16 Thread Alexey Kardashevskiy
On 08/16/2013 08:08 PM, Wei Yang wrote: --- arch/powerpc/kernel/iommu.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index b20ff17..5abf7c3 100644 --- a/arch/powerpc/kernel/iommu.c +++

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

2013-07-09 Thread Alexey Kardashevskiy
On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated

Re: [PATCH 2/8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-07-09 Thread Alexey Kardashevskiy
On 07/10/2013 01:35 AM, Alexander Graf wrote: On 06/27/2013 07:02 AM, Alexey Kardashevskiy wrote: Signed-off-by: Alexey Kardashevskiya...@ozlabs.ru --- include/uapi/linux/kvm.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h

Re: [PATCH 5/8] powerpc: add real mode support for dma operations on powernv

2013-07-09 Thread Alexey Kardashevskiy
On 07/10/2013 02:02 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: The existing TCE machine calls (tce_build and tce_free) only support virtual mode as they call __raw_writeq for TCE invalidation what fails in real mode. This introduces tce_build_rm

Re: [PATCH 6/8] KVM: PPC: Add support for multiple-TCE hcalls

2013-07-09 Thread Alexey Kardashevskiy
On 07/10/2013 03:02 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds real mode handlers for the H_PUT_TCE_INDIRECT and H_STUFF_TCE hypercalls for QEMU emulated devices such as IBMVIO devices or emulated PCI. These calls allow adding multiple entries (up

Re: [PATCH 2/8] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO

2013-07-10 Thread Alexey Kardashevskiy
On 07/10/2013 08:27 PM, Alexander Graf wrote: On 10.07.2013, at 01:35, Alexey Kardashevskiy wrote: On 07/10/2013 01:35 AM, Alexander Graf wrote: On 06/27/2013 07:02 AM, Alexey Kardashevskiy wrote: Signed-off-by: Alexey Kardashevskiya...@ozlabs.ru --- include/uapi/linux/kvm.h |2

Re: [PATCH 6/8] KVM: PPC: Add support for multiple-TCE hcalls

2013-07-10 Thread Alexey Kardashevskiy
On 07/10/2013 08:05 PM, Alexander Graf wrote: On 10.07.2013, at 07:00, Alexey Kardashevskiy wrote: On 07/10/2013 03:02 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds real mode handlers for the H_PUT_TCE_INDIRECT and H_STUFF_TCE hypercalls for QEMU

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

2013-07-11 Thread Alexey Kardashevskiy
On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated

Re: [PATCH 6/8] KVM: PPC: Add support for multiple-TCE hcalls

2013-07-11 Thread Alexey Kardashevskiy
On 07/11/2013 08:11 PM, Alexander Graf wrote: On 11.07.2013, at 07:12, Alexey Kardashevskiy wrote: On 07/10/2013 08:05 PM, Alexander Graf wrote: On 10.07.2013, at 07:00, Alexey Kardashevskiy wrote: On 07/10/2013 03:02 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey

  1   2   3   4   5   6   7   8   9   10   >