Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755981AbcDNOX5 (ORCPT ); Thu, 14 Apr 2016 10:23:57 -0400 Received: from foss.arm.com ([217.140.101.70]:43195 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755605AbcDNOXy (ORCPT ); Thu, 14 Apr 2016 10:23:54 -0400 Subject: Re: [PATCH v2 08/17] kvm-arm: arm: Introduce hyp page table empty checks To: Suzuki K Poulose , linux-arm-kernel@lists.infradead.org References: <1460640065-27658-1-git-send-email-suzuki.poulose@arm.com> <1460640065-27658-9-git-send-email-suzuki.poulose@arm.com> Cc: kvm@vger.kernel.org, christoffer.dall@linaro.org, mark.rutland@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu From: Marc Zyngier Organization: ARM Ltd Message-ID: <570FA7F1.7090403@arm.com> Date: Thu, 14 Apr 2016 15:23:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <1460640065-27658-9-git-send-email-suzuki.poulose@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1255 Lines: 36 On 14/04/16 14:20, Suzuki K Poulose wrote: > Introduce hyp_pxx_table_empty helpers for checking whether > a given table entry is empty. This will be used explicitly > once we switch to explicit routines for hyp page table walk. > > Cc: Marc Zyngier > Reviewed-by: Christoffer Dall > Signed-off-by: Suzuki K Poulose > --- > arch/arm/include/asm/kvm_mmu.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h > index 7d207b4..901c1ea 100644 > --- a/arch/arm/include/asm/kvm_mmu.h > +++ b/arch/arm/include/asm/kvm_mmu.h > @@ -162,6 +162,10 @@ static inline bool kvm_page_empty(void *ptr) > #define kvm_pmd_table_empty(kvm, pmdp) kvm_page_empty(pmdp) > #define kvm_pud_table_empty(kvm, pudp) (0) > > +#define hyp_pte_table_empty(ptep) kvm_page_empty(ptep) > +#define hyp_pmd_table_empty(pmdp) kvm_page_empty(pmdp) > +#define hyp_pud_table_empty(pudp) (0) > + > static inline void *kvm_get_hwpgd(struct kvm *kvm) > { > return kvm->arch.pgd; > Same remarks as the previous patch, but nonetheless: Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...