From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29CD3C4727C for ; Tue, 29 Sep 2020 17:34:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C697620936 for ; Tue, 29 Sep 2020 17:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601400855; bh=j0fCGiLcbnkITaxQRT0Ke2lzkcknLm9OTwR/cvXL0XE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=NG2SMO+r/Kn5NK2o8qZ0dhJBI8JGF/qRNi0Kh0DySL1sBj33qQl2hPmSBqUnWpiZ2 mMzdwbtmMbZjuMZVHoIUzBCak49HoZT5yzTuKp2pCnhbByrCXR6j1IXp+Qu3ugH1vR MXz14eLhzc2Fb35MhycAOlYR+dZIknEqx49S7Now= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729272AbgI2ReO (ORCPT ); Tue, 29 Sep 2020 13:34:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:52600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728205AbgI2ReO (ORCPT ); Tue, 29 Sep 2020 13:34:14 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F2BD42075F; Tue, 29 Sep 2020 17:34:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601400853; bh=j0fCGiLcbnkITaxQRT0Ke2lzkcknLm9OTwR/cvXL0XE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e/6aevJ8x5eLSFiTmIwukWzyhkAbSNY5IS3lu9gBeiCTqp3Deya4iQV85YYPrPNR+ uITte911QYHvItarSn0LYoaR4TvndgCdpIsTrblTpxrHXZsFbZQLiQwAOS7SQqNv4m 4wxmWcDhYBM7gDR4fQcBa4vnb8E/ha/kp8TvnAcQ= Date: Tue, 29 Sep 2020 18:34:07 +0100 From: Will Deacon To: David Brazdil Cc: kvmarm@lists.cs.columbia.edu, Catalin Marinas , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Dennis Zhou , Tejun Heo , Christoph Lameter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com, Andrew Scull Subject: Re: [PATCH v4 05/10] kvm: arm64: Remove hyp_adr/ldr_this_cpu Message-ID: <20200929173407.GC14317@willie-the-truck> References: <20200922204910.7265-1-dbrazdil@google.com> <20200922204910.7265-6-dbrazdil@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922204910.7265-6-dbrazdil@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 22, 2020 at 09:49:05PM +0100, David Brazdil wrote: > The hyp_adr/ldr_this_cpu helpers were introduced for use in hyp code > because they always needed to use TPIDR_EL2 for base, while > adr/ldr_this_cpu from kernel proper would select between TPIDR_EL2 and > _EL1 based on VHE/nVHE. > > Simplify this now that the hyp mode case can be handled using the > __KVM_VHE/NVHE_HYPERVISOR__ macros. > > Acked-by: Andrew Scull > Acked-by: Will Deacon > Signed-off-by: David Brazdil > --- > arch/arm64/include/asm/assembler.h | 29 +++++++++++++++++++---------- > arch/arm64/include/asm/kvm_asm.h | 14 +------------- > arch/arm64/kvm/hyp/hyp-entry.S | 2 +- > 3 files changed, 21 insertions(+), 24 deletions(-) > > diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h > index 54d181177656..86e0ef79a799 100644 > --- a/arch/arm64/include/asm/assembler.h > +++ b/arch/arm64/include/asm/assembler.h > @@ -218,6 +218,23 @@ lr .req x30 // link register > str \src, [\tmp, :lo12:\sym] > .endm > > + /* > + * @dst: destination register (32 or 64 bit wide) nit: this comment is wrong as I don't think mrs can take a W register as the destination argument. I'm assuming Marc can fix that up. Will