Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3970352pxk; Tue, 29 Sep 2020 10:38:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEUqkdfIG8T59NNnBKBFa2TbQu122DJhOrZSr9/x//yPXNP+EKFo4Gcv6VK0kN731/hlsk X-Received: by 2002:a05:6402:10c6:: with SMTP id p6mr4538493edu.76.1601401084621; Tue, 29 Sep 2020 10:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601401084; cv=none; d=google.com; s=arc-20160816; b=WPp0JbGmvVpEQI3s5AEIEthfvUHoMGhaWNUxyxSb8XF/HSheaEtQgxzd6bbXyamDJR 22JjRF4zAt9sQsBq+Ao+7Jlp5FqLOyRvlnN+sy0z09HGX+lg/OeTmbI8dnjFD7gSTqSu arywlw2F5/2fAt1IzMjRPGunfNkdQrV3YeBQbFO8doo8/PhrxwEvnGR7WcsPJgd7S0Ek 9nEiYySw93HgNxRVQUHkWrW2QwtlQdgfv1SMJ9iUxFOEKu/s+a1Y22BZeO2PM7rbS3UK J1Wj2ZoDZR9bI72xm+9AAmpytoec85YCajZjlcMtO5yQFkcbhXJArjbth0Hua0Xj5Gxi pPqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mzZADM/xxnOuPMGxNNcLzDF5adVTrpLQKDME+3jh8ww=; b=EHFdbLJamADTwZYYsCGjsMndVXnQW8pkWc0w02Wdh0g6QA01EmfiU5k0Rx/3KuTaLt uvUfXyLE6sUgwUqyLSllowG2aR+lZbOtjv9jr3yS+xF/MmVTzxFIu8OAYP8cKw+dECV2 7fZQ6y6L1Odv9afFIgdayF+QllkTm3YfEMGvAINE1NQoz8DwQkq2MIXdckHNvwSb8VxB BUFa4OTSeWTe9e46yQ/YMUYD8rPWxeE7BxQ8R/ujAqrHikzICOfjHHf+2Cg3NwvvIPra VTy4WKaH6+8VfpejbZH0GXF4w13E+WoS+6ueJCf+8yRrqeUzTdhRJL8qMNLl+0FD6RXP VZDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e/6aevJ8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si3293247ejo.270.2020.09.29.10.37.40; Tue, 29 Sep 2020 10:38:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e/6aevJ8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbgI2ReO (ORCPT + 99 others); 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