Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755570AbcDHOj7 (ORCPT ); Fri, 8 Apr 2016 10:39:59 -0400 Received: from foss.arm.com ([217.140.101.70]:39959 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbcDHOj5 (ORCPT ); Fri, 8 Apr 2016 10:39:57 -0400 Subject: Re: [PATCH 07/17] kvm-arm: arm32: Introduce stage2 page table helpers To: Christoffer Dall References: <1459787177-12767-1-git-send-email-suzuki.poulose@arm.com> <1459787177-12767-8-git-send-email-suzuki.poulose@arm.com> <20160408124332.GL8961@cbox> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, marc.zyngier@arm.com, mark.rutland@arm.com, will.deacon@arm.com, catalin.marinas@arm.com From: Suzuki K Poulose Message-ID: <5707C2B9.1020000@arm.com> Date: Fri, 8 Apr 2016 15:39:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20160408124332.GL8961@cbox> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1701 Lines: 45 On 08/04/16 13:43, Christoffer Dall wrote: > On Mon, Apr 04, 2016 at 05:26:07PM +0100, Suzuki K Poulose wrote: >> Define the page table helpers for walking the stage2 pagetable >> for arm. Since both hyp and stage2 have the same number of levels, >> as that of the host we reuse the host helpers. >> >> The exceptions are the p.d_addr_end routines which have to deal >> with IPA > 32bit, hence we use the open coded version of their host helpers >> which supports 64bit. >> >> +#ifndef __ARM_S2_PGTABLE_H_ >> +#define __ARM_S2_PGTABLE_H_ >> + >> +#define stage2_pgd_none(pgd) pgd_none(pgd) >> +#define stage2_pgd_clear(pgd) pgd_clear(pgd) >> +#define stage2_pgd_present(pgd) pgd_present(pgd) >> +#define stage2_pgd_populate(mm, pgd, pud) pgd_populate(mm, pgd, pud) >> +#define stage2_pud_offset(pgd, address) pud_offset(pgd, address) >> +#define stage2_pud_free(mm, pud) pud_free(mm, pud) >> + >> +#define stage2_pud_none(pud) pud_none(pud) >> +#define stage2_pud_clear(pud) pud_clear(pud) >> +#define stage2_pud_present(pud) pud_present(pud) >> +#define stage2_pud_populate(mm, pud, pmd) pud_populate(mm, pud, pmd) >> +#define stage2_pmd_offset(pud, address) pmd_offset(pud, address) >> +#define stage2_pmd_free(mm, pmd) pmd_free(mm, pmd) >> + >> +#define stage2_pud_huge(pud) pud_huge(pud) > > could we get rid of the mm parameter to all these stage2_ versions above > and simply implement them with the generic functions passing NULL in the > definitions instead? We could, I retained it just to match the corresponding host version. Will change it in the next version. > > Otherwise: > Reviewed-by: Christoffer Dall Thanks Suzuki