Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp959076pxb; Wed, 3 Mar 2021 22:33:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzmzmStmngBM6c4sm/Gr2cq6h58sIGjkiVK7PQClzApzVCdPk8wxyLrYkYzZomqAHwf8+5 X-Received: by 2002:a17:907:9870:: with SMTP id ko16mr2574974ejc.227.1614839589403; Wed, 03 Mar 2021 22:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839589; cv=none; d=google.com; s=arc-20160816; b=FAPR3Cj+kzLhFbPKA+4FV/ce08GiIGl9uvppa0XZyW9SdOeOGJrF50JTO03g0nS5n2 uKBWOilcE0/CSLzmwez3zmDX+LxEItAM6OfcnrxiQeVpbGJNSBbFD4cejQ2k2Ic14LuE vchrcUQT6we6hDS3EWVeJh5oegmKpcGCQir8OIlKPc+QuM+mNLPf0Bn2U/plh5v3jfZq fr02GVceFp1kj+dLEPWDTfDM13dah5sXvC2hMgK0lSLyTwNRxXeJbMFsMATJaJdsvgB1 Dk+WwDaWz+d6A4hnTujBM1qla5Sgn/XI8njsLgQjs6QSww3uIHqOnecQhZclIBeboAF2 Tp1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=T621CrLzDVvHMT7g1JI2svAdR9qKxB9zRXJEq9CxOEU=; b=EO1yIrs5/odPKe46kT8TQ9W2zvJ3H0/1DpkgRV6alVc9+N48XwkUlttpEcsfPrX2q7 F1YbAhorI1cqZQY2wC1dalicXAj746S29sav/COipXe9+25Bnmj1sXAhG2VLIaAb/sRt UUef4UwZjK70i1GjKHs4Pl6qDlN7MFaqyucAY8IEmX1DW8vdGnNEQkcr0xnCnftEC89M wsW+OwaJfqRvtJcGA2MmyVKA7Y+0KvkjnuE6iP3uflDgtYYIlO8a88hBxRghpPRYXBVE HzZYQnqEdbC/68MnZsn3f/pOzXx0mGpXuRmGLExwgTPUcPmLwc5Zwmypwx+NEFAp2pD1 30zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JhVB1bpG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si17271004edm.154.2021.03.03.22.32.45; Wed, 03 Mar 2021 22:33:09 -0800 (PST) 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=@google.com header.s=20161025 header.b=JhVB1bpG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352185AbhCBSUz (ORCPT + 99 others); Tue, 2 Mar 2021 13:20:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1578855AbhCBP2D (ORCPT ); Tue, 2 Mar 2021 10:28:03 -0500 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76163C061D7D for ; Tue, 2 Mar 2021 07:00:27 -0800 (PST) Received: by mail-qk1-x74a.google.com with SMTP id a1so5188468qkn.11 for ; Tue, 02 Mar 2021 07:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=T621CrLzDVvHMT7g1JI2svAdR9qKxB9zRXJEq9CxOEU=; b=JhVB1bpGiYn1jRzMxn5C86Cv84iFwqhC6iR5apn3eWaYAhiRMUSeUiA/loGNHC6UEZ WXJ7G+oIo0kRVVksB+BCF8QFW7BhegDukCh8s7n3swxcqA2kN9JLclL0IFaqfGiqGYZw wMwnC0Nm6lKe/+9njbqaVCvnF2gW6ls0LuTrHRUJwjGtQbiS/ziLG8McYhBEndabj5u4 lXqBAEzmTjgHHDB+UnlVBrk5jiudORfTBxu2CTEnE8ITDIwRVAd2UVMEl4YPH6u1i4cw 18SIyImxlr2wYX1yNBmi2YQPDuGfAGwYpUaQcVzbN2FuvEq9+DGEN/acYO9wm5gY3URn WgMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=T621CrLzDVvHMT7g1JI2svAdR9qKxB9zRXJEq9CxOEU=; b=sKJXQc/LM1oT5LVRF2FPfhj6q3kjr+2b69fxRFCTwSD+bgfy9chg1gPs5YWF6d7o7I EvNh/pxP2UzSj7qz+ENp5GzJYFV5yYF4erKNcZfaCpTVoywG+iZnQLGXtMYDB1ThFwwB s1bd6GBH3n7Edz7Zy6k4SKkLo1CEErVO64x7+jooskHoFwr3PKB509HWUqSdWKA7AUgk odFeewTqIJ9e/sxQzBCHDBoIJBH2KU8yteCogTcuZ9JkI4HG0puPEX8kOWDSMuiLYxhh DZH0eTJCVfJWsW8hL8uuejHuOL48Kql/fVqknrp+q0xQoKkmbPTjkA3yeDb1rP+cZX97 LoRA== X-Gm-Message-State: AOAM532EXnTyDk9Ttx2GOcp3II58RvvJt3FPCX8y6Bqu8cxdCQlQ2HRZ 6OcuJHEEDckxSdSAfeG+O0TqRu3y9+w4 Sender: "qperret via sendgmr" X-Received: from r2d2-qp.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1652]) (user=qperret job=sendgmr) by 2002:a0c:b7a7:: with SMTP id l39mr3898578qve.56.1614697226584; Tue, 02 Mar 2021 07:00:26 -0800 (PST) Date: Tue, 2 Mar 2021 14:59:39 +0000 In-Reply-To: <20210302150002.3685113-1-qperret@google.com> Message-Id: <20210302150002.3685113-10-qperret@google.com> Mime-Version: 1.0 References: <20210302150002.3685113-1-qperret@google.com> X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog Subject: [PATCH v3 09/32] KVM: arm64: Allow using kvm_nvhe_sym() in hyp code From: Quentin Perret To: catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com Cc: android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, tabba@google.com, mark.rutland@arm.com, dbrazdil@google.com, mate.toth-pal@arm.com, seanjc@google.com, qperret@google.com, robh+dt@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to allow the usage of code shared by the host and the hyp in static inline library functions, allow the usage of kvm_nvhe_sym() at EL2 by defaulting to the raw symbol name. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/hyp_image.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/hyp_image.h b/arch/arm64/include/asm/hyp_image.h index 78cd77990c9c..b4b3076a76fb 100644 --- a/arch/arm64/include/asm/hyp_image.h +++ b/arch/arm64/include/asm/hyp_image.h @@ -10,11 +10,15 @@ #define __HYP_CONCAT(a, b) a ## b #define HYP_CONCAT(a, b) __HYP_CONCAT(a, b) +#ifndef __KVM_NVHE_HYPERVISOR__ /* * 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 +#else +#define kvm_nvhe_sym(sym) sym +#endif #ifdef LINKER_SCRIPT -- 2.30.1.766.gb4fecdf3b7-goog