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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 A1323C433E2 for ; Wed, 16 Sep 2020 17:36:34 +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 23D7320708 for ; Wed, 16 Sep 2020 17:36:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BCEBK1Ib"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="M2E0n8qJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23D7320708 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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6jlg0WbaDaIDLdUMUs3ZQK7fJHMCunDrW2fhW+rVhf4=; b=BCEBK1IbNBq+MHFo6L/BOjol6 /ARW0td030bWxL72m+pR5L+3u7kq+6HW7AqZHuvYQaBkP1yy/9DSc4AS784+ZoAGP1AOarSt5kwuX cCkcjpwBOvARx4VwURM/hSmk1/gHL2FY6hBvgDOz2KBfhjMCp6Pyguvo8FRvqRR+WUPWQryIqRLfZ +vT0ljv3UJxU4epGAd1CdlRIfb+f/P7F6fp37uzl43AV9Z2CLDC44vSkugwe2Gzy3Bjv6hHe1rNg9 XURvVTmxscFs02dEyj3GXPYOoxuNKfNjn69W76yoEK0+yD6aM/G0BzwFM2PIzanWgncXG9e0zFOk/ 1od1+dbNw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIbKf-0000uU-29; Wed, 16 Sep 2020 17:35:01 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIbKU-0000pg-8d for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 17:34:51 +0000 Received: by mail-wr1-x444.google.com with SMTP id z4so7803577wrr.4 for ; Wed, 16 Sep 2020 10:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Bb8x+HFH0B/5AJF/3eHINfl7a3Qa0+GTsxwxT6ItzrA=; b=M2E0n8qJMz1MSrSfqdhktCcaOa3AQGk1vmL6Kdjan+YvnN4Uq1JyhmWHaYif2qseKo 7MBBvjOhBg96grbm9ZP7di/5Ks/FE2YU5A0RILohThIR4aygnTZpnOQeqCylD42bNDyZ /GHnv4SVspVP2I7UqGWfOnLnq5PZJXg+7LmAU0usi0LcCoKhWVg20JXWk1gD7Dx9jJ2h urT8MmXA1a4IPXVtGsD2MRKI6+46OC9ZsTGpnmm2FO5qccUyI+KkWdAiMgPH10nR7JU0 V4lLP2rS82e7Q3ZSw1KO5ix3ERwkqgea+/sU+waTdQCUBZqwD4luhpsk5LacwlUFA16t 6RIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bb8x+HFH0B/5AJF/3eHINfl7a3Qa0+GTsxwxT6ItzrA=; b=NqenQxZ6gyt0Duolfk2X1ncLY0qvVpO2STRpsfOLrNqEUCnZvOpZgSrtvkAa70N0In YReagvYcsuVANp/wgJSCBi1aThVpgHkr1IR512ySyc0CLeAC8XCIsNk53SpTJl1/dGVA hH7XhymRZ0mfv4CkDfjU1M01xThfIn6Fc5PLPrCGBTCbiNP0AI6OoXVD7EKs4aNWi465 5ClPnufiejMPwDlgjnP9CHisSZEopHIiZIhfw9ftkO5qTihGFYcnDnJfCYfFVnWw5YVt cdDJgnKtW9LmdIp7mPSNLfJxL5gr/lGX6CHZ4wm0Yuw9Kt42Xz0+7zd/cDP3rgU+nJ24 mGIQ== X-Gm-Message-State: AOAM530JSLbv6kr7XJnS1v/skYplKCVmiFqotEiwlS94kQvOviv8QPYu K+i9yJMqzORU4HYyVU3xrRr+eg== X-Google-Smtp-Source: ABdhPJyyusmPWRRPVeBCNm47H5a0PGpw8keKMBDtnH6wTG9FWTwQc0RSofvNwO/KVylWvPlmtAdRqQ== X-Received: by 2002:adf:8162:: with SMTP id 89mr28955370wrm.237.1600277689224; Wed, 16 Sep 2020 10:34:49 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:e49d:f6be:d31b:ad3c]) by smtp.gmail.com with ESMTPSA id d19sm3530522wmd.0.2020.09.16.10.34.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Sep 2020 10:34:48 -0700 (PDT) From: David Brazdil To: kvmarm@lists.cs.columbia.edu Subject: [PATCH v3 02/11] kvm: arm64: Move nVHE hyp namespace macros to hyp_image.h Date: Wed, 16 Sep 2020 18:34:30 +0100 Message-Id: <20200916173439.32265-3-dbrazdil@google.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200916173439.32265-1-dbrazdil@google.com> References: <20200916173439.32265-1-dbrazdil@google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_133450_358515_41E3F359 X-CRM114-Status: GOOD ( 16.59 ) 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: kernel-team@android.com, Suzuki K Poulose , Catalin Marinas , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Tejun Heo , Dennis Zhou , Christoph Lameter , David Brazdil , Will Deacon , 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 Minor cleanup to move all macros related to prefixing nVHE hyp section and symbol names into one place: hyp_image.h. Signed-off-by: David Brazdil --- arch/arm64/include/asm/hyp_image.h | 12 ++++++++++++ arch/arm64/include/asm/kvm_asm.h | 8 +------- arch/arm64/kernel/image-vars.h | 2 -- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/arm64/include/asm/hyp_image.h b/arch/arm64/include/asm/hyp_image.h index 5b1e3b9ef376..9848de588238 100644 --- a/arch/arm64/include/asm/hyp_image.h +++ b/arch/arm64/include/asm/hyp_image.h @@ -7,6 +7,12 @@ #ifndef __ARM64_HYP_IMAGE_H__ #define __ARM64_HYP_IMAGE_H__ +/* + * KVM nVHE code has its own symbol namespace prefixed with __kvm_nvhe_, + * to separate it from the kernel proper. + */ +#define kvm_nvhe_sym(sym) __kvm_nvhe_##sym + #ifdef LINKER_SCRIPT /* @@ -19,6 +25,12 @@ #define HYP_SECTION(NAME) \ HYP_SECTION_NAME(NAME) : { *(NAME NAME##.[0-9a-zA-Z_]*) } +/* + * Defines a linker script alias of a kernel-proper symbol referenced by + * KVM nVHE hyp code. + */ +#define KVM_NVHE_ALIAS(sym) kvm_nvhe_sym(sym) = sym; + #endif /* LINKER_SCRIPT */ #endif /* __ARM64_HYP_IMAGE_H__ */ diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h index 6f98fbd0ac81..c085032e2e3e 100644 --- a/arch/arm64/include/asm/kvm_asm.h +++ b/arch/arm64/include/asm/kvm_asm.h @@ -7,6 +7,7 @@ #ifndef __ARM_KVM_ASM_H__ #define __ARM_KVM_ASM_H__ +#include #include #define VCPU_WORKAROUND_2_FLAG_SHIFT 0 @@ -42,13 +43,6 @@ #include -/* - * Translate name of a symbol defined in nVHE hyp to the name seen - * by kernel proper. All nVHE symbols are prefixed by the build system - * to avoid clashes with the VHE variants. - */ -#define kvm_nvhe_sym(sym) __kvm_nvhe_##sym - #define DECLARE_KVM_VHE_SYM(sym) extern char sym[] #define DECLARE_KVM_NVHE_SYM(sym) extern char kvm_nvhe_sym(sym)[] diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h index 8982b68289b7..76da2ad1010c 100644 --- a/arch/arm64/kernel/image-vars.h +++ b/arch/arm64/kernel/image-vars.h @@ -61,8 +61,6 @@ __efistub__ctype = _ctype; * memory mappings. */ -#define KVM_NVHE_ALIAS(sym) __kvm_nvhe_##sym = sym; - /* Alternative callbacks for init-time patching of nVHE hyp code. */ KVM_NVHE_ALIAS(arm64_enable_wa2_handling); KVM_NVHE_ALIAS(kvm_patch_vector_branch); -- 2.28.0.618.gf4bc123cb7-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel