From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932762AbcDHPhI (ORCPT ); Fri, 8 Apr 2016 11:37:08 -0400 Received: from foss.arm.com ([217.140.101.70]:40379 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932677AbcDHPhG (ORCPT ); Fri, 8 Apr 2016 11:37:06 -0400 Subject: Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers To: Christoffer Dall References: <1459787177-12767-1-git-send-email-suzuki.poulose@arm.com> <1459787177-12767-14-git-send-email-suzuki.poulose@arm.com> <20160408134257.GW8961@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: <5707D01E.1050309@arm.com> Date: Fri, 8 Apr 2016 16:37:02 +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: <20160408134257.GW8961@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 On 08/04/16 14:42, Christoffer Dall wrote: > On Mon, Apr 04, 2016 at 05:26:13PM +0100, Suzuki K Poulose wrote: >> >> -static void clear_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr) >> +static void clear_stage2_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr) >> { >> - pmd_t *pmd_table = pmd_offset(pud, 0); >> - VM_BUG_ON(pud_huge(*pud)); >> - pud_clear(pud); >> + pmd_t *pmd_table __maybe_unused = stage2_pmd_offset(pud, 0); > > The __maybe_unused are slightly ugly, so it may be nicer to create the > stage2_pmd_free() as static inline's if they're defined to do nothing > instead. > Sure, we could do that for stage2. However, we will need to fix the host helpers as well for making such a change in the _hyp version (for 16K + 36bit VA). >> > > Acked-by: Christoffer Dall > Thanks Suzuki From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suzuki K Poulose Subject: Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers Date: Fri, 8 Apr 2016 16:37:02 +0100 Message-ID: <5707D01E.1050309@arm.com> References: <1459787177-12767-1-git-send-email-suzuki.poulose@arm.com> <1459787177-12767-14-git-send-email-suzuki.poulose@arm.com> <20160408134257.GW8961@cbox> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org To: Christoffer Dall Return-path: In-Reply-To: <20160408134257.GW8961@cbox> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu List-Id: kvm.vger.kernel.org On 08/04/16 14:42, Christoffer Dall wrote: > On Mon, Apr 04, 2016 at 05:26:13PM +0100, Suzuki K Poulose wrote: >> >> -static void clear_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr) >> +static void clear_stage2_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr) >> { >> - pmd_t *pmd_table = pmd_offset(pud, 0); >> - VM_BUG_ON(pud_huge(*pud)); >> - pud_clear(pud); >> + pmd_t *pmd_table __maybe_unused = stage2_pmd_offset(pud, 0); > > The __maybe_unused are slightly ugly, so it may be nicer to create the > stage2_pmd_free() as static inline's if they're defined to do nothing > instead. > Sure, we could do that for stage2. However, we will need to fix the host helpers as well for making such a change in the _hyp version (for 16K + 36bit VA). >> > > Acked-by: Christoffer Dall > Thanks Suzuki From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suzuki.Poulose@arm.com (Suzuki K Poulose) Date: Fri, 8 Apr 2016 16:37:02 +0100 Subject: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers In-Reply-To: <20160408134257.GW8961@cbox> References: <1459787177-12767-1-git-send-email-suzuki.poulose@arm.com> <1459787177-12767-14-git-send-email-suzuki.poulose@arm.com> <20160408134257.GW8961@cbox> Message-ID: <5707D01E.1050309@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 08/04/16 14:42, Christoffer Dall wrote: > On Mon, Apr 04, 2016 at 05:26:13PM +0100, Suzuki K Poulose wrote: >> >> -static void clear_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr) >> +static void clear_stage2_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr) >> { >> - pmd_t *pmd_table = pmd_offset(pud, 0); >> - VM_BUG_ON(pud_huge(*pud)); >> - pud_clear(pud); >> + pmd_t *pmd_table __maybe_unused = stage2_pmd_offset(pud, 0); > > The __maybe_unused are slightly ugly, so it may be nicer to create the > stage2_pmd_free() as static inline's if they're defined to do nothing > instead. > Sure, we could do that for stage2. However, we will need to fix the host helpers as well for making such a change in the _hyp version (for 16K + 36bit VA). >> > > Acked-by: Christoffer Dall > Thanks Suzuki