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

2013-11-25 Thread Alexey Kardashevskiy
uses kvm_vfio_find_group_by_liobn() once per KVM run and caches the result in kvm_arch. iommu_group_put() for all groups will be called when KVM finishes (in the SPAPR TCE in KVM enablement patch). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v4: * fixed few bugs * changed

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

2013-11-20 Thread Alexey Kardashevskiy
On 11/21/2013 07:57 AM, Alex Williamson wrote: > On Wed, 2013-11-20 at 16:18 +1100, Alexey Kardashevskiy wrote: >> In addition to the external VFIO user API, a VFIO KVM device >> has been introduced recently. >> >> sPAPR TCE IOMMU is para-virtualized and the guest does

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

2013-11-20 Thread Alexey Kardashevskiy
On 11/21/2013 07:57 AM, Alex Williamson wrote: On Wed, 2013-11-20 at 16:18 +1100, Alexey Kardashevskiy wrote: In addition to the external VFIO user API, a VFIO KVM device has been introduced recently. sPAPR TCE IOMMU is para-virtualized and the guest does map/unmap via hypercalls which take

[PATCH v9] PPC: POWERNV: move iommu_add_device earlier

2013-11-12 Thread Alexey Kardashevskiy
() and iommu_del_device() are public now. Signed-off-by: Alexey Kardashevskiy --- Changes: v9: * removed "KVM" from the subject as it is not really a KVM patch so PPC mainainter (hi Ben!) can review/include it into his tree v8: * added the check for iommu_group!=NULL before removing device from a group as

[PATCH v9] PPC: POWERNV: move iommu_add_device earlier

2013-11-12 Thread Alexey Kardashevskiy
() and iommu_del_device() are public now. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v9: * removed KVM from the subject as it is not really a KVM patch so PPC mainainter (hi Ben!) can review/include it into his tree v8: * added the check for iommu_group!=NULL before removing device from a group

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

2013-11-05 Thread Alexey Kardashevskiy
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_group pointer) is cached in kvm_arch so the realmode handlers do not use VFIO KVM

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

2013-11-05 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- 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_group pointer) is cached in kvm_arch so the realmode handlers do

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

2013-10-04 Thread Alexey Kardashevskiy
On 10/05/2013 11:52 AM, Alexey Kardashevskiy wrote: > On 05.10.2013 2:05, Alex Williamson wrote: >> 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

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

2013-10-04 Thread Alexey Kardashevskiy
On 05.10.2013 2:05, Alex Williamson wrote: > 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 &

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

2013-10-04 Thread Alexey Kardashevskiy
but it works. Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/kvm/Kconfig | 1 + arch/powerpc/kvm/Makefile | 4 include/linux/kvm_host.h | 8 --- include/linux/vfio.h | 3 +++ include/uapi/linux/kvm.h | 1 + virt/kvm/vfio.c | 46

Re: [PATCH 3/4] kvm: Create non-coherent DMA registeration

2013-10-04 Thread Alexey Kardashevskiy
On 10/02/2013 06:15 AM, Alex Williamson wrote: > We currently use some ad-hoc arch variables tied to legacy KVM device > assignment to manage emulation of instructions that depend on whether > non-coherent DMA is present. Create an interface for this so that we > can register coherency for other

Re: [PATCH 3/4] kvm: Create non-coherent DMA registeration

2013-10-04 Thread Alexey Kardashevskiy
On 10/02/2013 06:15 AM, Alex Williamson wrote: We currently use some ad-hoc arch variables tied to legacy KVM device assignment to manage emulation of instructions that depend on whether non-coherent DMA is present. Create an interface for this so that we can register coherency for other

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

2013-10-04 Thread Alexey Kardashevskiy
but it works. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- arch/powerpc/kvm/Kconfig | 1 + arch/powerpc/kvm/Makefile | 4 include/linux/kvm_host.h | 8 --- include/linux/vfio.h | 3 +++ include/uapi/linux/kvm.h | 1 + virt/kvm/vfio.c | 46

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

2013-10-04 Thread Alexey Kardashevskiy
On 05.10.2013 2:05, Alex Williamson wrote: 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

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

2013-10-04 Thread Alexey Kardashevskiy
On 10/05/2013 11:52 AM, Alexey Kardashevskiy wrote: On 05.10.2013 2:05, Alex Williamson wrote: 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

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-25 Thread Alexey Kardashevskiy
On 09/26/2013 06:19 AM, Alex Williamson wrote: > On Sun, 2013-09-15 at 22:40 +1000, Alexey Kardashevskiy wrote: >> On 09/14/2013 02:25 AM, Alex Williamson wrote: >>> On Fri, 2013-09-13 at 18:49 +1000, Alexey Kardashevskiy wrote: >>>> On 09/13/2013 07:23 AM, Alex

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-25 Thread Alexey Kardashevskiy
On 09/26/2013 06:19 AM, Alex Williamson wrote: On Sun, 2013-09-15 at 22:40 +1000, Alexey Kardashevskiy wrote: On 09/14/2013 02:25 AM, Alex Williamson wrote: On Fri, 2013-09-13 at 18:49 +1000, Alexey Kardashevskiy wrote: On 09/13/2013 07:23 AM, Alex Williamson wrote: So far we've succeeded

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-15 Thread Alexey Kardashevskiy
On 09/14/2013 02:25 AM, Alex Williamson wrote: > On Fri, 2013-09-13 at 18:49 +1000, Alexey Kardashevskiy wrote: >> On 09/13/2013 07:23 AM, Alex Williamson wrote: >>> So far we've succeeded at making KVM and VFIO mostly unaware of each >>> other, but there's any import

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-15 Thread Alexey Kardashevskiy
On 09/14/2013 02:25 AM, Alex Williamson wrote: On Fri, 2013-09-13 at 18:49 +1000, Alexey Kardashevskiy wrote: On 09/13/2013 07:23 AM, Alex Williamson wrote: So far we've succeeded at making KVM and VFIO mostly unaware of each other, but there's any important point where that breaks down

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-13 Thread Alexey Kardashevskiy
On 09/13/2013 07:23 AM, Alex Williamson wrote: > So far we've succeeded at making KVM and VFIO mostly unaware of each > other, but there's any important point where that breaks down. Intel > VT-d hardware may or may not support snoop control. When snoop > control is available, intel-iommu

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-13 Thread Alexey Kardashevskiy
On 09/13/2013 07:23 AM, Alex Williamson wrote: So far we've succeeded at making KVM and VFIO mostly unaware of each other, but there's any important point where that breaks down. Intel VT-d hardware may or may not support snoop control. When snoop control is available, intel-iommu promotes

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

2013-09-06 Thread Alexey Kardashevskiy
On 09/06/2013 04:57 PM, Gleb Natapov wrote: > On Thu, Sep 05, 2013 at 02:05:09PM +1000, Benjamin Herrenschmidt wrote: >> On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote: Or supporting all IOMMU links (and leaving emulated stuff as is) in on "device" is the last thing I have to do

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

2013-09-06 Thread Alexey Kardashevskiy
connection 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 Signed-off-by: Alexey Kardashevskiy --- Changes: v10: * all IOMMU TCE links are handled

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

2013-09-06 Thread Alexey Kardashevskiy
On 09/06/2013 04:57 PM, Gleb Natapov wrote: > On Thu, Sep 05, 2013 at 02:05:09PM +1000, Benjamin Herrenschmidt wrote: >> On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote: Or supporting all IOMMU links (and leaving emulated stuff as is) in on "device" is the last thing I have to do

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

2013-09-06 Thread Alexey Kardashevskiy
On 09/06/2013 04:01 PM, Gleb Natapov wrote: > On Fri, Sep 06, 2013 at 09:38:21AM +1000, Alexey Kardashevskiy wrote: >> On 09/06/2013 04:10 AM, Gleb Natapov wrote: >>> On Wed, Sep 04, 2013 at 02:01:28AM +1000, Alexey Kardashevskiy wrote: >>>> On 09/03/2013 08:53 PM, Gl

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

2013-09-06 Thread Alexey Kardashevskiy
On 09/06/2013 04:01 PM, Gleb Natapov wrote: On Fri, Sep 06, 2013 at 09:38:21AM +1000, Alexey Kardashevskiy wrote: On 09/06/2013 04:10 AM, Gleb Natapov wrote: On Wed, Sep 04, 2013 at 02:01:28AM +1000, Alexey Kardashevskiy wrote: On 09/03/2013 08:53 PM, Gleb Natapov wrote: On Mon, Sep 02, 2013

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

2013-09-06 Thread Alexey Kardashevskiy
On 09/06/2013 04:57 PM, Gleb Natapov wrote: On Thu, Sep 05, 2013 at 02:05:09PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote: Or supporting all IOMMU links (and leaving emulated stuff as is) in on device is the last thing I have to do and then

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

2013-09-06 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: v10: * all IOMMU TCE links

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

2013-09-06 Thread Alexey Kardashevskiy
On 09/06/2013 04:57 PM, Gleb Natapov wrote: On Thu, Sep 05, 2013 at 02:05:09PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote: Or supporting all IOMMU links (and leaving emulated stuff as is) in on device is the last thing I have to do and then

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

2013-09-05 Thread Alexey Kardashevskiy
On 09/06/2013 04:10 AM, Gleb Natapov wrote: > On Wed, Sep 04, 2013 at 02:01:28AM +1000, Alexey Kardashevskiy wrote: >> On 09/03/2013 08:53 PM, Gleb Natapov wrote: >>> On Mon, Sep 02, 2013 at 01:14:29PM +1000, Alexey Kardashevskiy wrote: >>>> On 09/01/2013 10:06 PM, Gl

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

2013-09-05 Thread Alexey Kardashevskiy
On 09/06/2013 04:10 AM, Gleb Natapov wrote: On Wed, Sep 04, 2013 at 02:01:28AM +1000, Alexey Kardashevskiy wrote: On 09/03/2013 08:53 PM, Gleb Natapov wrote: On Mon, Sep 02, 2013 at 01:14:29PM +1000, Alexey Kardashevskiy wrote: On 09/01/2013 10:06 PM, Gleb Natapov wrote: On Wed, Aug 28, 2013

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

2013-09-03 Thread Alexey Kardashevskiy
On 09/03/2013 08:53 PM, Gleb Natapov wrote: > On Mon, Sep 02, 2013 at 01:14:29PM +1000, Alexey Kardashevskiy wrote: >> On 09/01/2013 10:06 PM, Gleb Natapov wrote: >>> On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote: >>>> This allows the h

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

2013-09-03 Thread Alexey Kardashevskiy
On 09/03/2013 08:53 PM, Gleb Natapov wrote: On Mon, Sep 02, 2013 at 01:14:29PM +1000, Alexey Kardashevskiy wrote: On 09/01/2013 10:06 PM, Gleb Natapov wrote: On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE

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

2013-09-01 Thread Alexey Kardashevskiy
On 09/01/2013 10:06 PM, Gleb Natapov wrote: > On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote: >> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT >> and H_STUFF_TCE requests targeted an IOMMU TCE table without passing >> them to user s

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

2013-09-01 Thread Alexey Kardashevskiy
On 09/01/2013 09:27 PM, Gleb Natapov wrote: > On Wed, Aug 28, 2013 at 06:37:41PM +1000, Alexey Kardashevskiy wrote: >> This reserves a capability number for upcoming support >> of VFIO-IOMMU DMA operations in real mode. >> >> This reserves a number for a new "SPAP

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

2013-09-01 Thread Alexey Kardashevskiy
On 09/01/2013 09:27 PM, Gleb Natapov wrote: On Wed, Aug 28, 2013 at 06:37:41PM +1000, Alexey Kardashevskiy wrote: This reserves a capability number for upcoming support of VFIO-IOMMU DMA operations in real mode. This reserves a number for a new SPAPR TCE IOMMU KVM device which is going

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

2013-09-01 Thread Alexey Kardashevskiy
On 09/01/2013 10:06 PM, Gleb Natapov wrote: On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests targeted an IOMMU TCE table without passing them to user space which saves time

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

2013-08-30 Thread Alexey Kardashevskiy
On 08/28/2013 06:37 PM, Alexey Kardashevskiy wrote: > This accelerates VFIO DMA operations on POWER by moving them > into kernel. > > This depends on VFIO external API patch which is on its way to upstream. > > Changes: > v9: > * replaced the "link logical bus number

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

2013-08-30 Thread Alexey Kardashevskiy
On 08/28/2013 06:37 PM, Alexey Kardashevskiy wrote: This accelerates VFIO DMA operations on POWER by moving them into kernel. This depends on VFIO external API patch which is on its way to upstream. Changes: v9: * replaced the link logical bus number to IOMMU group ioctl to KVM

[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 Signed-off-by: Alexey Kardashevskiy --- 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 replaces with hashtable

[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 --- arch/powerpc/kvm/book3s_64_vio.c | 49

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

2013-08-28 Thread Alexey Kardashevskiy
connection 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 Signed-off-by: Alexey Kardashevskiy --- Changes: v9: * KVM_CAP_SPAPR_TCE_IOMMU ioctl to KV

[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 --- 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/powerpc/kvm

[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 --- Changes: v8: * added the check for iommu_group!=NULL before removing device from a group as suggested by Wei Yang v2: * added a helper - set_iommu_table_base_and_group - which does set_iommu_table_base() and iommu_add_device() --- arch

[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 --- Changes: 2013/07/16: * changed the number --- include/uapi/linux/kvm.h | 1

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

2013-08-28 Thread Alexey Kardashevskiy
ot; KVM device which is going to be used for initialization. Signed-off-by: Alexey Kardashevskiy --- 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 wh

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

2013-08-28 Thread Alexey Kardashevskiy
k3s_64_vio*. 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 --- arch/powerpc/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/Kconfig b/arch/p

[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 --- Changes: v8: * fixed warnings from check_patch.pl --- arch/powerpc/include/asm/iommu.h | 9 +- arch/powerpc/kernel

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

2013-08-28 Thread Alexey Kardashevskiy
ul Mackerras Signed-off-by: Paul Mackerras Signed-off-by: Alexey Kardashevskiy --- 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 existing get_page_unless_zero(). * removed realmo

[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 Signed-off-by: Alexey Kardashevskiy --- Changelog: v8

[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 --- Changes: v8: * fixed warnings from check_patch.pl --- include

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

2013-08-28 Thread Alexey Kardashevskiy
nobody ever reacted on "hashtable: 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_d

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

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

[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 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

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

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

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 Yan

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

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(

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-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 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 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.

[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 --- 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 order in a file

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: >>>> >>

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 &g

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

[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 --- 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| 9

[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 --- 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/pci-p5ioc2.c

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

2013-08-14 Thread Alexey Kardashevskiy
Torvalds Cc: Santosh Rastapur Cc: Jay Fenlason Cc: David S. Miller Cc: Divy Le ray Signed-off-by: Alexey Kardashevskiy --- drivers/net/ethernet/chelsio/cxgb3/sge.c | 107 +++ 1 file changed, 24 insertions(+), 83 deletions(-) diff --git a/drivers/net/ethernet/chelsio/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: BUG cxgb3: Check and handle the dma mapping errors

2013-08-12 Thread Alexey Kardashevskiy
Ping, anyone? On 08/08/2013 03:38 PM, Alexey Kardashevskiy wrote: > On 08/08/2013 02:55 AM, Divy Le ray wrote: >> On 08/05/2013 11:41 AM, Jay Fenlason wrote: >>> On Mon, Aug 05, 2013 at 12:59:04PM +1000, Alexey Kardashevskiy wrote: >>>> Hi! >>>> >&

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

2013-08-12 Thread Alexey Kardashevskiy
Ping, anyone? On 08/08/2013 03:38 PM, Alexey Kardashevskiy wrote: On 08/08/2013 02:55 AM, Divy Le ray wrote: On 08/05/2013 11: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

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

2013-08-07 Thread Alexey Kardashevskiy
On 08/08/2013 02:55 AM, Divy Le ray wrote: > On 08/05/2013 11: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: >>> &g

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

2013-08-07 Thread Alexey Kardashevskiy
On 08/08/2013 02:55 AM, Divy Le ray wrote: On 08/05/2013 11: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

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 >>

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

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

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

[PATCH 02/10] KVM: PPC: reserve a capability number for multitce support

2013-07-31 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 --- Changes: 2013/07/16: * changed the number Signed-off-by: Alexey

<    10   11   12   13   14   15   16   17   18   19   >