From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Kardashevskiy Date: Tue, 07 May 2013 03:28:51 +0000 Subject: Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages Message-Id: <518874F3.50807@ozlabs.ru> List-Id: References: <1367824921-27151-1-git-send-email-y> <51875a36.25ac440a.50d9.ffffe90d@mx.google.com> <1367874436.2868.90.camel@ul30vt.home> <51884FA8.6010400@ozlabs.ru> <1367890979.2868.93.camel@ul30vt.home> In-Reply-To: <1367890979.2868.93.camel@ul30vt.home> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alex Williamson Cc: linuxppc-dev@lists.ozlabs.org, David Gibson , Benjamin Herrenschmidt , Paul Mackerras , Alexander Graf , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-pci@vger.kernel.org On 05/07/2013 11:42 AM, Alex Williamson wrote: > 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, aik@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 on POWER using hypercalls. >>>> >>>> However, in order to link a kernel with the CONFIG_IOMMU_API enabled, >>>> the empty kvm_iommu_map_pages/kvm_iommu_unmap_pages have to be >>>> defined, so this defines them. >>>> >>>> Signed-off-by: Alexey Kardashevskiy >>>> Cc: David Gibson >>>> Signed-off-by: Paul Mackerras >>>> --- >>>> arch/powerpc/include/asm/kvm_host.h | 14 ++++++++++++++ >>>> 1 file changed, 14 insertions(+) >>>> >>>> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h >>>> index b6a047e..c025d91 100644 >>>> --- a/arch/powerpc/include/asm/kvm_host.h >>>> +++ b/arch/powerpc/include/asm/kvm_host.h >>>> @@ -603,4 +603,18 @@ struct kvm_vcpu_arch { >>>> >>>> #define __KVM_HAVE_ARCH_WQP >>>> >>>> +#ifdef CONFIG_IOMMU_API >>>> +/* POWERPC does not use IOMMU API for mapping/unmapping */ >>>> +static inline int kvm_iommu_map_pages(struct kvm *kvm, >>>> + struct kvm_memory_slot *slot) >>>> +{ >>>> + return 0; >>>> +} >>>> + >>>> +static inline void kvm_iommu_unmap_pages(struct kvm *kvm, >>>> + struct kvm_memory_slot *slot) >>>> +{ >>>> +} >>>> +#endif /* CONFIG_IOMMU_API */ >>>> + >>>> #endif /* __POWERPC_KVM_HOST_H__ */ >>> >>> This is no longer needed, Gleb applied my patch for 3.10 that make all >>> of KVM device assignment dependent on a build config option and the top >>> level kvm_host.h now includes this when that is not set. Thanks, >> >> Cannot find it, could you point me please where it is on github or >> git.kernel.org? Thanks. > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id*5bab1004729f3302c776e53ee7c895b98bb1ce Yes, I confirm, this is patch is not need any more. Thanks! -- Alexey From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f44.google.com ([209.85.160.44]:45258 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758838Ab3EGD3A (ORCPT ); Mon, 6 May 2013 23:29:00 -0400 Received: by mail-pb0-f44.google.com with SMTP id wz17so82206pbc.17 for ; Mon, 06 May 2013 20:28:59 -0700 (PDT) Message-ID: <518874F3.50807@ozlabs.ru> Date: Tue, 07 May 2013 13:28:51 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 To: Alex Williamson CC: linuxppc-dev@lists.ozlabs.org, David Gibson , Benjamin Herrenschmidt , Paul Mackerras , Alexander Graf , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages References: <1367824921-27151-1-git-send-email-y> <51875a36.25ac440a.50d9.ffffe90d@mx.google.com> <1367874436.2868.90.camel@ul30vt.home> <51884FA8.6010400@ozlabs.ru> <1367890979.2868.93.camel@ul30vt.home> In-Reply-To: <1367890979.2868.93.camel@ul30vt.home> Content-Type: text/plain; charset=KOI8-R Sender: linux-pci-owner@vger.kernel.org List-ID: On 05/07/2013 11:42 AM, Alex Williamson wrote: > 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, aik@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 on POWER using hypercalls. >>>> >>>> However, in order to link a kernel with the CONFIG_IOMMU_API enabled, >>>> the empty kvm_iommu_map_pages/kvm_iommu_unmap_pages have to be >>>> defined, so this defines them. >>>> >>>> Signed-off-by: Alexey Kardashevskiy >>>> Cc: David Gibson >>>> Signed-off-by: Paul Mackerras >>>> --- >>>> arch/powerpc/include/asm/kvm_host.h | 14 ++++++++++++++ >>>> 1 file changed, 14 insertions(+) >>>> >>>> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h >>>> index b6a047e..c025d91 100644 >>>> --- a/arch/powerpc/include/asm/kvm_host.h >>>> +++ b/arch/powerpc/include/asm/kvm_host.h >>>> @@ -603,4 +603,18 @@ struct kvm_vcpu_arch { >>>> >>>> #define __KVM_HAVE_ARCH_WQP >>>> >>>> +#ifdef CONFIG_IOMMU_API >>>> +/* POWERPC does not use IOMMU API for mapping/unmapping */ >>>> +static inline int kvm_iommu_map_pages(struct kvm *kvm, >>>> + struct kvm_memory_slot *slot) >>>> +{ >>>> + return 0; >>>> +} >>>> + >>>> +static inline void kvm_iommu_unmap_pages(struct kvm *kvm, >>>> + struct kvm_memory_slot *slot) >>>> +{ >>>> +} >>>> +#endif /* CONFIG_IOMMU_API */ >>>> + >>>> #endif /* __POWERPC_KVM_HOST_H__ */ >>> >>> This is no longer needed, Gleb applied my patch for 3.10 that make all >>> of KVM device assignment dependent on a build config option and the top >>> level kvm_host.h now includes this when that is not set. Thanks, >> >> Cannot find it, could you point me please where it is on github or >> git.kernel.org? Thanks. > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2a5bab1004729f3302c776e53ee7c895b98bb1ce Yes, I confirm, this is patch is not need any more. Thanks! -- Alexey From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 1416C2C0141 for ; Tue, 7 May 2013 13:29:01 +1000 (EST) Received: by mail-pd0-f171.google.com with SMTP id r11so83996pdi.16 for ; Mon, 06 May 2013 20:28:59 -0700 (PDT) Message-ID: <518874F3.50807@ozlabs.ru> Date: Tue, 07 May 2013 13:28:51 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 To: Alex Williamson Subject: Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages References: <1367824921-27151-1-git-send-email-y> <51875a36.25ac440a.50d9.ffffe90d@mx.google.com> <1367874436.2868.90.camel@ul30vt.home> <51884FA8.6010400@ozlabs.ru> <1367890979.2868.93.camel@ul30vt.home> In-Reply-To: <1367890979.2868.93.camel@ul30vt.home> Content-Type: text/plain; charset=KOI8-R Cc: kvm@vger.kernel.org, Alexander Graf , kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Gibson List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 05/07/2013 11:42 AM, Alex Williamson wrote: > 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, aik@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 on POWER using hypercalls. >>>> >>>> However, in order to link a kernel with the CONFIG_IOMMU_API enabled, >>>> the empty kvm_iommu_map_pages/kvm_iommu_unmap_pages have to be >>>> defined, so this defines them. >>>> >>>> Signed-off-by: Alexey Kardashevskiy >>>> Cc: David Gibson >>>> Signed-off-by: Paul Mackerras >>>> --- >>>> arch/powerpc/include/asm/kvm_host.h | 14 ++++++++++++++ >>>> 1 file changed, 14 insertions(+) >>>> >>>> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h >>>> index b6a047e..c025d91 100644 >>>> --- a/arch/powerpc/include/asm/kvm_host.h >>>> +++ b/arch/powerpc/include/asm/kvm_host.h >>>> @@ -603,4 +603,18 @@ struct kvm_vcpu_arch { >>>> >>>> #define __KVM_HAVE_ARCH_WQP >>>> >>>> +#ifdef CONFIG_IOMMU_API >>>> +/* POWERPC does not use IOMMU API for mapping/unmapping */ >>>> +static inline int kvm_iommu_map_pages(struct kvm *kvm, >>>> + struct kvm_memory_slot *slot) >>>> +{ >>>> + return 0; >>>> +} >>>> + >>>> +static inline void kvm_iommu_unmap_pages(struct kvm *kvm, >>>> + struct kvm_memory_slot *slot) >>>> +{ >>>> +} >>>> +#endif /* CONFIG_IOMMU_API */ >>>> + >>>> #endif /* __POWERPC_KVM_HOST_H__ */ >>> >>> This is no longer needed, Gleb applied my patch for 3.10 that make all >>> of KVM device assignment dependent on a build config option and the top >>> level kvm_host.h now includes this when that is not set. Thanks, >> >> Cannot find it, could you point me please where it is on github or >> git.kernel.org? Thanks. > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2a5bab1004729f3302c776e53ee7c895b98bb1ce Yes, I confirm, this is patch is not need any more. Thanks! -- Alexey