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=-17.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL 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 4F17EC47247 for ; Thu, 30 Apr 2020 14:49:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E3E4217BA for ; Thu, 30 Apr 2020 14:49:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="d2VkIY9z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726581AbgD3OtO (ORCPT ); Thu, 30 Apr 2020 10:49:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728246AbgD3OtL (ORCPT ); Thu, 30 Apr 2020 10:49:11 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 327B5C035494 for ; Thu, 30 Apr 2020 07:49:11 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id x25so2194501wmc.0 for ; Thu, 30 Apr 2020 07:49:11 -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=wdv9+QboSB0n8mCt4SCrZeIquYs40oZsiEsRDsuUlz0=; b=d2VkIY9z2QxMTr9h0uS1PRKv10w2VGgdwRE0sKCV0WjUfaxd1zset/EMhBFQfskuJe goCtRuSXhK3kBgyLdjxZkBMTTngcnKPaSof2L7u3yexydH49mW/U9M2iAHHQSRFilRvM k5KEZcFespm6qTVeA32TSRCr6jhm8eRQ7Ym71GbZAd8JnCvyrcI6hKtB2OiGX+xOYXeV ZJH2zA3r+wbu9/VfJjCHzG1bm+FreLspb3qUpNwgCGbxVqCG0mvKmtssm+3ikb0CfkWM 4I5A3chetvEn8rgjOt0JZFuLRpLheKnZsDVdY+eVw++ctr0guSEm0z28nbRuzNSgGdil gVHg== 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=wdv9+QboSB0n8mCt4SCrZeIquYs40oZsiEsRDsuUlz0=; b=Fr1ZJkxS8oOttuzipq3vZ/CD3hYV2Not6JSf+466GpKOOuSrbF6On+8aALgkw24WVI Gt/XIhHdW7mIncVNuCo+NnHTneBErj4m1BjaurXncCfqsEVvcRugsqjkZ3/5ydLCThPh 3qzA1T2QEJeNdGfmvvP7JAqbPVT9nkIrGfUCA4tc8XwgZZuszrUPmR8i0CLme8HAMkBz d0mNa1LGXucgsm7osNDeFVbHwrVN/+LUCJPTDesDUYu1oafnyv3MYQJz0Iu9s6Jjjl9C W3ibvRqX3jGW8bnxNeSweRtu4h9C5hRJRBF27swrQesHuk/qAV0w4CXzAhrYlOkrOPTp 8jnA== X-Gm-Message-State: AGi0PuZjOObaEynSknU3nn86JM6uHqHuEN+lHF7qlwEeSMx1EsEWMFec NzEi0HWl9sHvKpIrM5PFROr7LQ== X-Google-Smtp-Source: APiQypI5dMJz38mZmwtrxPPLvPMzBmrs/Qs1QaCKD/ikyZpdAJowByuEdCLiCgMzdGxwo2O5sdWohw== X-Received: by 2002:a1c:7905:: with SMTP id l5mr3549110wme.5.1588258149457; Thu, 30 Apr 2020 07:49:09 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:d4b6:9828:8bd2:ce6f]) by smtp.gmail.com with ESMTPSA id a24sm12220432wmb.24.2020.04.30.07.49.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Apr 2020 07:49:08 -0700 (PDT) From: David Brazdil To: Catalin Marinas , James Morse , Julien Thierry , Marc Zyngier , Suzuki K Poulose , Will Deacon Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, David Brazdil Subject: [PATCH 13/15] arm64: kvm: Add comments around __hyp_text_ symbol aliases Date: Thu, 30 Apr 2020 15:48:29 +0100 Message-Id: <20200430144831.59194-14-dbrazdil@google.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200430144831.59194-1-dbrazdil@google.com> References: <20200430144831.59194-1-dbrazdil@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is part of a series which builds KVM's non-VHE hyp code separately from VHE and the rest of the kernel. With all source files split between VHE/nVHE, add comments around the list of symbols where nVHE code still links against kernel proper. Split them into groups and explain how each group is currently used. Some of these dependencies will be removed in the future. Signed-off-by: David Brazdil --- arch/arm64/kernel/image-vars.h | 49 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h index e272eedfe19a..04a3ee21e694 100644 --- a/arch/arm64/kernel/image-vars.h +++ b/arch/arm64/kernel/image-vars.h @@ -61,24 +61,37 @@ __efistub__ctype = _ctype; * memory mappings. */ -__hyp_text___icache_flags = __icache_flags; -__hyp_text___kvm_handle_stub_hvc = __kvm_handle_stub_hvc; -__hyp_text_arm64_const_caps_ready = arm64_const_caps_ready; -__hyp_text_arm64_enable_wa2_handling = arm64_enable_wa2_handling; -__hyp_text_arm64_ssbd_callback_required = arm64_ssbd_callback_required; -__hyp_text_cpu_hwcap_keys = cpu_hwcap_keys; -__hyp_text_cpu_hwcaps = cpu_hwcaps; -__hyp_text_kimage_voffset = kimage_voffset; -__hyp_text_kvm_host_data = kvm_host_data; -__hyp_text_kvm_patch_vector_branch = kvm_patch_vector_branch; -__hyp_text_kvm_update_va_mask = kvm_update_va_mask; -__hyp_text_kvm_vgic_global_state = kvm_vgic_global_state; -__hyp_text_panic = panic; -__hyp_text_physvirt_offset = physvirt_offset; -__hyp_text_sve_load_state = sve_load_state; -__hyp_text_sve_save_state = sve_save_state; -__hyp_text_vgic_v2_cpuif_trap = vgic_v2_cpuif_trap; -__hyp_text_vgic_v3_cpuif_trap = vgic_v3_cpuif_trap; +/* If nVHE code panics, it ERETs into panic() in EL1. */ +__hyp_text_panic = panic; + +/* Stub HVC IDs are routed to a handler in .hyp.idmap.text. Executed in EL2. */ +__hyp_text___kvm_handle_stub_hvc = __kvm_handle_stub_hvc; + +/* Alternative callbacks, referenced in .altinstructions. Executed in EL1. */ +__hyp_text_arm64_enable_wa2_handling = arm64_enable_wa2_handling; +__hyp_text_kvm_patch_vector_branch = kvm_patch_vector_branch; +__hyp_text_kvm_update_va_mask = kvm_update_va_mask; + +/* Values used to convert between memory mappings, read-only after init. */ +__hyp_text_kimage_voffset = kimage_voffset; +__hyp_text_physvirt_offset = physvirt_offset; + +/* Data shared with the kernel. */ +__hyp_text_cpu_hwcaps = cpu_hwcaps; +__hyp_text_cpu_hwcap_keys = cpu_hwcap_keys; +__hyp_text___icache_flags = __icache_flags; +__hyp_text_kvm_vgic_global_state = kvm_vgic_global_state; +__hyp_text_arm64_ssbd_callback_required = arm64_ssbd_callback_required; +__hyp_text_kvm_host_data = kvm_host_data; + +/* Static keys shared with the kernel. */ +__hyp_text_arm64_const_caps_ready = arm64_const_caps_ready; +__hyp_text_vgic_v2_cpuif_trap = vgic_v2_cpuif_trap; +__hyp_text_vgic_v3_cpuif_trap = vgic_v3_cpuif_trap; + +/* SVE support, currently unused by nVHE. */ +__hyp_text_sve_save_state = sve_save_state; +__hyp_text_sve_load_state = sve_load_state; #endif /* CONFIG_KVM */ -- 2.26.1 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=-9.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,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 7D8C9C47253 for ; Thu, 30 Apr 2020 14:49:21 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 34C262074A for ; Thu, 30 Apr 2020 14:49:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="d2VkIY9z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34C262074A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E41714B44B; Thu, 30 Apr 2020 10:49:20 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I3mqH0YtLcwp; Thu, 30 Apr 2020 10:49:19 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 552084B50B; Thu, 30 Apr 2020 10:49:16 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 453084B4AC for ; Thu, 30 Apr 2020 10:49:15 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OKkAQp0i2R2a for ; Thu, 30 Apr 2020 10:49:14 -0400 (EDT) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id B7C204B4E9 for ; Thu, 30 Apr 2020 10:49:10 -0400 (EDT) Received: by mail-wm1-f67.google.com with SMTP id 188so2190852wmc.2 for ; Thu, 30 Apr 2020 07:49:10 -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=wdv9+QboSB0n8mCt4SCrZeIquYs40oZsiEsRDsuUlz0=; b=d2VkIY9z2QxMTr9h0uS1PRKv10w2VGgdwRE0sKCV0WjUfaxd1zset/EMhBFQfskuJe goCtRuSXhK3kBgyLdjxZkBMTTngcnKPaSof2L7u3yexydH49mW/U9M2iAHHQSRFilRvM k5KEZcFespm6qTVeA32TSRCr6jhm8eRQ7Ym71GbZAd8JnCvyrcI6hKtB2OiGX+xOYXeV ZJH2zA3r+wbu9/VfJjCHzG1bm+FreLspb3qUpNwgCGbxVqCG0mvKmtssm+3ikb0CfkWM 4I5A3chetvEn8rgjOt0JZFuLRpLheKnZsDVdY+eVw++ctr0guSEm0z28nbRuzNSgGdil gVHg== 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=wdv9+QboSB0n8mCt4SCrZeIquYs40oZsiEsRDsuUlz0=; b=t0mvMh7t+XTqnW6N7LjX16rYbJPrNfDlsM5uW8WLA1DI++DydGI1SMV4ztfrWprsNK 5WPVhEgdE0xAjcBbG4/xYncYrHp46XP4X8jbpF+Dgho9QNZEiV613kL550Juia58mcZ1 N8oTytxYCbU/bPX9Kdll1sGtJEjn0RoucDg0fstrCJVKadadL+GjODkQ1XYp4td4l+vv oEhUOToGRrUg4sgXdpXYcqI5D0be+TiR6cO884iutk0rNK7NNY8JPEuXpZbwb3ww+gQf 7hH1hlfEBKQHPdkNT0eHPyG0CdD0gUTLCHIpKz5/uqVoBKS6YX2GuCgFJK1cwB66HuGx SYYw== X-Gm-Message-State: AGi0PuawXcZOIFnCF87Uu4OLDn6ERVyr0GHFGZF27qu2zym+d/qpGWQx I0ZXRgIq+BYV9j1UNx+1Se9dzg== X-Google-Smtp-Source: APiQypI5dMJz38mZmwtrxPPLvPMzBmrs/Qs1QaCKD/ikyZpdAJowByuEdCLiCgMzdGxwo2O5sdWohw== X-Received: by 2002:a1c:7905:: with SMTP id l5mr3549110wme.5.1588258149457; Thu, 30 Apr 2020 07:49:09 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:d4b6:9828:8bd2:ce6f]) by smtp.gmail.com with ESMTPSA id a24sm12220432wmb.24.2020.04.30.07.49.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Apr 2020 07:49:08 -0700 (PDT) From: David Brazdil To: Catalin Marinas , James Morse , Julien Thierry , Marc Zyngier , Suzuki K Poulose , Will Deacon Subject: [PATCH 13/15] arm64: kvm: Add comments around __hyp_text_ symbol aliases Date: Thu, 30 Apr 2020 15:48:29 +0100 Message-Id: <20200430144831.59194-14-dbrazdil@google.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200430144831.59194-1-dbrazdil@google.com> References: <20200430144831.59194-1-dbrazdil@google.com> MIME-Version: 1.0 Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu This patch is part of a series which builds KVM's non-VHE hyp code separately from VHE and the rest of the kernel. With all source files split between VHE/nVHE, add comments around the list of symbols where nVHE code still links against kernel proper. Split them into groups and explain how each group is currently used. Some of these dependencies will be removed in the future. Signed-off-by: David Brazdil --- arch/arm64/kernel/image-vars.h | 49 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h index e272eedfe19a..04a3ee21e694 100644 --- a/arch/arm64/kernel/image-vars.h +++ b/arch/arm64/kernel/image-vars.h @@ -61,24 +61,37 @@ __efistub__ctype = _ctype; * memory mappings. */ -__hyp_text___icache_flags = __icache_flags; -__hyp_text___kvm_handle_stub_hvc = __kvm_handle_stub_hvc; -__hyp_text_arm64_const_caps_ready = arm64_const_caps_ready; -__hyp_text_arm64_enable_wa2_handling = arm64_enable_wa2_handling; -__hyp_text_arm64_ssbd_callback_required = arm64_ssbd_callback_required; -__hyp_text_cpu_hwcap_keys = cpu_hwcap_keys; -__hyp_text_cpu_hwcaps = cpu_hwcaps; -__hyp_text_kimage_voffset = kimage_voffset; -__hyp_text_kvm_host_data = kvm_host_data; -__hyp_text_kvm_patch_vector_branch = kvm_patch_vector_branch; -__hyp_text_kvm_update_va_mask = kvm_update_va_mask; -__hyp_text_kvm_vgic_global_state = kvm_vgic_global_state; -__hyp_text_panic = panic; -__hyp_text_physvirt_offset = physvirt_offset; -__hyp_text_sve_load_state = sve_load_state; -__hyp_text_sve_save_state = sve_save_state; -__hyp_text_vgic_v2_cpuif_trap = vgic_v2_cpuif_trap; -__hyp_text_vgic_v3_cpuif_trap = vgic_v3_cpuif_trap; +/* If nVHE code panics, it ERETs into panic() in EL1. */ +__hyp_text_panic = panic; + +/* Stub HVC IDs are routed to a handler in .hyp.idmap.text. Executed in EL2. */ +__hyp_text___kvm_handle_stub_hvc = __kvm_handle_stub_hvc; + +/* Alternative callbacks, referenced in .altinstructions. Executed in EL1. */ +__hyp_text_arm64_enable_wa2_handling = arm64_enable_wa2_handling; +__hyp_text_kvm_patch_vector_branch = kvm_patch_vector_branch; +__hyp_text_kvm_update_va_mask = kvm_update_va_mask; + +/* Values used to convert between memory mappings, read-only after init. */ +__hyp_text_kimage_voffset = kimage_voffset; +__hyp_text_physvirt_offset = physvirt_offset; + +/* Data shared with the kernel. */ +__hyp_text_cpu_hwcaps = cpu_hwcaps; +__hyp_text_cpu_hwcap_keys = cpu_hwcap_keys; +__hyp_text___icache_flags = __icache_flags; +__hyp_text_kvm_vgic_global_state = kvm_vgic_global_state; +__hyp_text_arm64_ssbd_callback_required = arm64_ssbd_callback_required; +__hyp_text_kvm_host_data = kvm_host_data; + +/* Static keys shared with the kernel. */ +__hyp_text_arm64_const_caps_ready = arm64_const_caps_ready; +__hyp_text_vgic_v2_cpuif_trap = vgic_v2_cpuif_trap; +__hyp_text_vgic_v3_cpuif_trap = vgic_v3_cpuif_trap; + +/* SVE support, currently unused by nVHE. */ +__hyp_text_sve_save_state = sve_save_state; +__hyp_text_sve_load_state = sve_load_state; #endif /* CONFIG_KVM */ -- 2.26.1 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-9.7 required=3.0 tests=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, 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 4A43CC4724C for ; Thu, 30 Apr 2020 14:54:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0AED72076D for ; Thu, 30 Apr 2020 14:54:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hFdtY/KD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="d2VkIY9z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AED72076D 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+infradead-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=bombadil.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=JRSZHRVVFrtkIMYkzATmKrTCjW4mI6ZjPzHvbsJxfg4=; b=hFdtY/KD8/ZIee 935u5lSzD1zR2BmR1GUS4tLo36BbMFxpFhsxIpeiXun/f0grgLVKfSHVOdMYnOrh9O94GOhFTJzKv mmCyeCp7EyVKZdcN849yKAViEdw4VfKOcI1WlSwf4c9sEdPoLzPWhM9hXMKz70D/ZvB+iXlPl+Wa0 HT9ZlOI4n6tmDmc7BKb8odis1pykOd6NwvTHwa1YgcOE32u1KLgx0PxGGPadS7nJR8tldu8IZ+MS1 ZDDJquuGhaUAm4e+PjwhYCMuABAMFiAPFaRsaHCm325CJxfh2B5e4vsVAwTFRAQOHLLCCiRLB/Xt/ r2nzTUoBO+y9oGYOdCfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUAa9-00027P-Cl; Thu, 30 Apr 2020 14:54:33 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUAUx-000447-8t for linux-arm-kernel@lists.infradead.org; Thu, 30 Apr 2020 14:49:23 +0000 Received: by mail-wm1-x344.google.com with SMTP id x4so2188341wmj.1 for ; Thu, 30 Apr 2020 07:49:11 -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=wdv9+QboSB0n8mCt4SCrZeIquYs40oZsiEsRDsuUlz0=; b=d2VkIY9z2QxMTr9h0uS1PRKv10w2VGgdwRE0sKCV0WjUfaxd1zset/EMhBFQfskuJe goCtRuSXhK3kBgyLdjxZkBMTTngcnKPaSof2L7u3yexydH49mW/U9M2iAHHQSRFilRvM k5KEZcFespm6qTVeA32TSRCr6jhm8eRQ7Ym71GbZAd8JnCvyrcI6hKtB2OiGX+xOYXeV ZJH2zA3r+wbu9/VfJjCHzG1bm+FreLspb3qUpNwgCGbxVqCG0mvKmtssm+3ikb0CfkWM 4I5A3chetvEn8rgjOt0JZFuLRpLheKnZsDVdY+eVw++ctr0guSEm0z28nbRuzNSgGdil gVHg== 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=wdv9+QboSB0n8mCt4SCrZeIquYs40oZsiEsRDsuUlz0=; b=snSiZAwAENe/j7PLFuPOXCpCrOvdVyqBSIUjjKnft5LHh299vr0P4H18/bP4btafME DBgDDyVn0QXPMv3Mw8nQsIXB/2Om2ijqIc+ZwDFm4h35X8uU+s65vW3c+GOVr0mcaaQh 9dTOv2OOsN3qKZK7Mn+t28Zy2vSZ4d1G5qcls0MgAAZWcr9zJHjgw2pA6TTowfilgBy6 niHRLbJZ//6KqqLa/jlCwv0x7DdRiE1CMcp25yH1H0ny9/4/hT0N1c3CYthsseWQDi20 WF7Y7qYoMWOEi3oqBwRoOsN3en5lsvyCevuEb/ay0HpCiW6mUNcyIFiakvn4EHlV2TWG 5lzw== X-Gm-Message-State: AGi0Pub8Xhn2ZGEKA80uYg9e9j0pkg++ZWQgvCAcj3ufl9C0tahd8JAY CY5RCYIwmYorb5Dh5ZF+kbQwWA== X-Google-Smtp-Source: APiQypI5dMJz38mZmwtrxPPLvPMzBmrs/Qs1QaCKD/ikyZpdAJowByuEdCLiCgMzdGxwo2O5sdWohw== X-Received: by 2002:a1c:7905:: with SMTP id l5mr3549110wme.5.1588258149457; Thu, 30 Apr 2020 07:49:09 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:d4b6:9828:8bd2:ce6f]) by smtp.gmail.com with ESMTPSA id a24sm12220432wmb.24.2020.04.30.07.49.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Apr 2020 07:49:08 -0700 (PDT) From: David Brazdil To: Catalin Marinas , James Morse , Julien Thierry , Marc Zyngier , Suzuki K Poulose , Will Deacon Subject: [PATCH 13/15] arm64: kvm: Add comments around __hyp_text_ symbol aliases Date: Thu, 30 Apr 2020 15:48:29 +0100 Message-Id: <20200430144831.59194-14-dbrazdil@google.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200430144831.59194-1-dbrazdil@google.com> References: <20200430144831.59194-1-dbrazdil@google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200430_074911_335204_3E938953 X-CRM114-Status: GOOD ( 12.48 ) 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: David Brazdil , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch is part of a series which builds KVM's non-VHE hyp code separately from VHE and the rest of the kernel. With all source files split between VHE/nVHE, add comments around the list of symbols where nVHE code still links against kernel proper. Split them into groups and explain how each group is currently used. Some of these dependencies will be removed in the future. Signed-off-by: David Brazdil --- arch/arm64/kernel/image-vars.h | 49 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h index e272eedfe19a..04a3ee21e694 100644 --- a/arch/arm64/kernel/image-vars.h +++ b/arch/arm64/kernel/image-vars.h @@ -61,24 +61,37 @@ __efistub__ctype = _ctype; * memory mappings. */ -__hyp_text___icache_flags = __icache_flags; -__hyp_text___kvm_handle_stub_hvc = __kvm_handle_stub_hvc; -__hyp_text_arm64_const_caps_ready = arm64_const_caps_ready; -__hyp_text_arm64_enable_wa2_handling = arm64_enable_wa2_handling; -__hyp_text_arm64_ssbd_callback_required = arm64_ssbd_callback_required; -__hyp_text_cpu_hwcap_keys = cpu_hwcap_keys; -__hyp_text_cpu_hwcaps = cpu_hwcaps; -__hyp_text_kimage_voffset = kimage_voffset; -__hyp_text_kvm_host_data = kvm_host_data; -__hyp_text_kvm_patch_vector_branch = kvm_patch_vector_branch; -__hyp_text_kvm_update_va_mask = kvm_update_va_mask; -__hyp_text_kvm_vgic_global_state = kvm_vgic_global_state; -__hyp_text_panic = panic; -__hyp_text_physvirt_offset = physvirt_offset; -__hyp_text_sve_load_state = sve_load_state; -__hyp_text_sve_save_state = sve_save_state; -__hyp_text_vgic_v2_cpuif_trap = vgic_v2_cpuif_trap; -__hyp_text_vgic_v3_cpuif_trap = vgic_v3_cpuif_trap; +/* If nVHE code panics, it ERETs into panic() in EL1. */ +__hyp_text_panic = panic; + +/* Stub HVC IDs are routed to a handler in .hyp.idmap.text. Executed in EL2. */ +__hyp_text___kvm_handle_stub_hvc = __kvm_handle_stub_hvc; + +/* Alternative callbacks, referenced in .altinstructions. Executed in EL1. */ +__hyp_text_arm64_enable_wa2_handling = arm64_enable_wa2_handling; +__hyp_text_kvm_patch_vector_branch = kvm_patch_vector_branch; +__hyp_text_kvm_update_va_mask = kvm_update_va_mask; + +/* Values used to convert between memory mappings, read-only after init. */ +__hyp_text_kimage_voffset = kimage_voffset; +__hyp_text_physvirt_offset = physvirt_offset; + +/* Data shared with the kernel. */ +__hyp_text_cpu_hwcaps = cpu_hwcaps; +__hyp_text_cpu_hwcap_keys = cpu_hwcap_keys; +__hyp_text___icache_flags = __icache_flags; +__hyp_text_kvm_vgic_global_state = kvm_vgic_global_state; +__hyp_text_arm64_ssbd_callback_required = arm64_ssbd_callback_required; +__hyp_text_kvm_host_data = kvm_host_data; + +/* Static keys shared with the kernel. */ +__hyp_text_arm64_const_caps_ready = arm64_const_caps_ready; +__hyp_text_vgic_v2_cpuif_trap = vgic_v2_cpuif_trap; +__hyp_text_vgic_v3_cpuif_trap = vgic_v3_cpuif_trap; + +/* SVE support, currently unused by nVHE. */ +__hyp_text_sve_save_state = sve_save_state; +__hyp_text_sve_load_state = sve_load_state; #endif /* CONFIG_KVM */ -- 2.26.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel