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=-7.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 5BDC8C07548 for ; Thu, 10 Sep 2020 12:36:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F08E2208FE for ; Thu, 10 Sep 2020 12:36:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dH4NKZzE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="JpErupGX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F08E2208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IitWDV7gZ0zrvAXWsmf82rONAhUoqioMqRwfxlCoZG4=; b=dH4NKZzEf9vnckKv+zlQi8lia owYmeW4g+P4r2zfNFj4u1Zl/idQs+izY3Id6aLWRjKG6LZGgypVwM3aWkobiD/XRGcRL+y5/ZDd66 scVLA5w11VtkT942vZ6X1Kg0mvi4qMosjKxvkXsg8+NkWvtmSpjDupIDycTPs7nE3LHVuIHyOg8pw qY3YCjlSF5AzRMtju0KwUeFWebB/TB8SxaN/PYzaT/mo8SIUkxQ3GA7Wce7q3wPmoDPeNlIPZ2LsQ 2Pzmar+HA8MvDz624rNVksUaQx1xD0q5wsp+4/BnPaaSRASGy+zsglAU67+K49q9gtqaH3zyfNmLa rVXqqewIg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGLn3-0004n6-DL; Thu, 10 Sep 2020 12:35:01 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGLn0-0004mG-Cp for linux-arm-kernel@lists.infradead.org; Thu, 10 Sep 2020 12:34:59 +0000 Received: by mail-wr1-x442.google.com with SMTP id e16so6546105wrm.2 for ; Thu, 10 Sep 2020 05:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ou9injEFK3ynx6TLorApjrz9C+IV+NUJDgRb4FiGCd0=; b=JpErupGX9fulmYZvxtdV0U32w7X1pxyfApvEkhWK8zhYuxW1uI+EqU5Fjv9BaF9H/V YurieurqjypG7BJAUBnBCH5arbZ3tVER2qmEt+rAqI4sfn3j4bXg9iz0fRz0pKoPNL3y YSW2fRVwWb6wg82ODMDH5pUFWZ0GjjH48pGAH5EmstenSokAdTz7Xt7zn4OgIwRIR4l9 0fLwBGV8McXKD8aluzhihwYePyApjjulnhMvLjwOH3WO1/cwpNtD7nu9TdVZ4OCMjA8S c9CQIJkAS0fQVUjZIlIZtaLGjr0eQHoBc0Ml2c5fY6fYDFZIe4MRDXrAX2YVoKmv1DK0 bwYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ou9injEFK3ynx6TLorApjrz9C+IV+NUJDgRb4FiGCd0=; b=KVjkqIfinUYq/R+ACGCewzZzVZJCp/UNg0t4GMaMewISlRZPuRdnyiKpc06NIZiPhy 3H9L9049PRc6QyIMatLcFFsabAolms3aa1aNubME0POAHcAjwI6BcpUUYwUR35SzCDMg 7JrHDkaJntuWgrHWOyY53WoNDJ5NdguSJC7B961fFEcLRBoGRxz8Qk41XssnELl/C9bM 44bW5AOLz3pH0q+aVVuLazURVomOb9a77KOaxvik2AlWViTG0L5PIVEvN96CpytimQDr rJInzW1qEz4P/guVA4XtNciOVAXFjlh39Zb96ycDUsXUD7UKwOJ1EVsNA9KAaBbQYjtw pLMA== X-Gm-Message-State: AOAM532CwJ2kA1/JpqoQvJgph7WAR0dKAxRgLaI1L10tGIsXmGBQCFJm e6I1FKfC+XOaZMcQ+eqAyoNhzg== X-Google-Smtp-Source: ABdhPJzW0hcZaP/tw8LsHLMPTKiwkkYHFromXeW07uLdryNq4J0OhAM1tb62eb6pB/v/hKExJM8Mhg== X-Received: by 2002:a5d:6886:: with SMTP id h6mr9066135wru.374.1599741297317; Thu, 10 Sep 2020 05:34:57 -0700 (PDT) Received: from google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) by smtp.gmail.com with ESMTPSA id n21sm3532461wmi.21.2020.09.10.05.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 05:34:56 -0700 (PDT) Date: Thu, 10 Sep 2020 13:34:52 +0100 From: Andrew Scull To: David Brazdil Subject: Re: [PATCH v2 04/10] kvm: arm64: Remove hyp_adr/ldr_this_cpu Message-ID: <20200910123452.GD93664@google.com> References: <20200903091712.46456-1-dbrazdil@google.com> <20200903091712.46456-5-dbrazdil@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200903091712.46456-5-dbrazdil@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_083458_458443_48E23296 X-CRM114-Status: GOOD ( 18.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, kernel-team@android.com, Arnd Bergmann , Suzuki K Poulose , Marc Zyngier , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Tejun Heo , Dennis Zhou , Christoph Lameter , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 03, 2020 at 11:17:06AM +0200, 'David Brazdil' via kernel-team 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 nVHE hyp mode case can be handled using the > __KVM_NVHE_HYPERVISOR__ macro. VHE selects _EL2 with alternatives. > > Signed-off-by: David Brazdil Acked-by: Andrew Scull > diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h > index 54d181177656..b392a977efb6 100644 > --- a/arch/arm64/include/asm/assembler.h > +++ b/arch/arm64/include/asm/assembler.h > @@ -218,6 +218,21 @@ lr .req x30 // link register > str \src, [\tmp, :lo12:\sym] > .endm > > + /* > + * @dst: destination register (32 or 64 bit wide) > + */ > + .macro this_cpu_offset, dst > +#ifdef __KVM_NVHE_HYPERVISOR__ > + mrs \dst, tpidr_el2 Another part that might also apply to __KVM_VHE_HYPERVISOR__. > +#else > +alternative_if_not ARM64_HAS_VIRT_HOST_EXTN > + mrs \dst, tpidr_el1 > +alternative_else > + mrs \dst, tpidr_el2 > +alternative_endif > +#endif > + .endm _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel