From patchwork Sun Apr 23 17:09:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9695051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4707260245 for ; Sun, 23 Apr 2017 17:13:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31B8726530 for ; Sun, 23 Apr 2017 17:13:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26A52265B9; Sun, 23 Apr 2017 17:13:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B95FA26530 for ; Sun, 23 Apr 2017 17:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162412AbdDWRNk (ORCPT ); Sun, 23 Apr 2017 13:13:40 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36786 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162418AbdDWRKo (ORCPT ); Sun, 23 Apr 2017 13:10:44 -0400 Received: by mail-wm0-f54.google.com with SMTP id u65so7508904wmu.1 for ; Sun, 23 Apr 2017 10:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kODiPBXCJTlN0NSLOHqJj/CX6ef0zaIVPP5Cw5yHvws=; b=Gm0biny4zT7iNa9qhFoaVq1mmxOQyrHJD+6OcOvMhx/NLC4QDDUa3QwvXaIdYhCzxr VkSx2dyXZRCpO9N6OG0yKSgvOasgWHMM5xbprlgLcg6ryoNWWqiNXnCwo6TmRhjfPIDX CTxCwRu/K4vK4ed2Kvg8Dev8R6Nv2ldKfsslM= 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; bh=kODiPBXCJTlN0NSLOHqJj/CX6ef0zaIVPP5Cw5yHvws=; b=R1NGnJk13Uj7OYyb45obapE5db1AWO2oB+J2wTYHq7WuBJOs9we1qTs9nZ3Xo0WG65 YIIJIJSRfT6xG1XWTW8alUA3ck2ipux51eDS2MyNGIUEhs3u5Ilv8h8/VqU2ND+33oci 3jyYxpjfpjKYH6qE74bvcPhFpW+H9WgJrOYW3WRd1FW4GuKsSLzzzRFz0zl8cPF02/ir nmN+OqmowM0tINhlpSDCBSEYzR1+ks51f5u4PIQ00Q/9ux/OtxM1isu/WlqdiGNNS0yB VVBRrdyNJy02jFzBP2n3rvQV9q0vntDuZZVmD4DcXR7/mpCIaAcDFuQWvMD7ntI87mjS fiZA== X-Gm-Message-State: AN3rC/7xL5RKsTr/+AdlbDpC6+YAS4fwTZcxJe44IGopoXQeOQAjbBvB bmzl/d9lmTXRPed/ X-Received: by 10.80.184.129 with SMTP id l1mr121750ede.88.1492967442075; Sun, 23 Apr 2017 10:10:42 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id 58sm2803521edz.2.2017.04.23.10.10.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:10:41 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall Subject: [PULL 66/79] arm64: hyp-stub/KVM: Kill __hyp_get_vectors Date: Sun, 23 Apr 2017 19:09:16 +0200 Message-Id: <20170423170929.27334-67-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170423170929.27334-1-cdall@linaro.org> References: <20170423170929.27334-1-cdall@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier Nobody is using __hyp_get_vectors anymore, so let's remove both implementations (hyp-stub and KVM). Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm64/include/asm/virt.h | 12 ++++-------- arch/arm64/kernel/hyp-stub.S | 13 +------------ arch/arm64/kvm/hyp-init.S | 7 +------ arch/arm64/kvm/hyp.S | 2 +- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h index 435514c..c5f8944 100644 --- a/arch/arm64/include/asm/virt.h +++ b/arch/arm64/include/asm/virt.h @@ -29,28 +29,25 @@ * indirection of a function call (as implemented in hyp-stub.S). */ -/* HVC_GET_VECTORS - Return the value of the vbar_el2 register. */ -#define HVC_GET_VECTORS 0 - /* * HVC_SET_VECTORS - Set the value of the vbar_el2 register. * * @x1: Physical address of the new vector table. */ -#define HVC_SET_VECTORS 1 +#define HVC_SET_VECTORS 0 /* * HVC_SOFT_RESTART - CPU soft reset, used by the cpu_soft_restart routine. */ -#define HVC_SOFT_RESTART 2 +#define HVC_SOFT_RESTART 1 /* * HVC_RESET_VECTORS - Restore the vectors to the original HYP stubs */ -#define HVC_RESET_VECTORS 3 +#define HVC_RESET_VECTORS 2 /* Max number of HYP stub hypercalls */ -#define HVC_STUB_HCALL_NR 4 +#define HVC_STUB_HCALL_NR 3 /* Error returned when an invalid stub number is passed into x0 */ #define HVC_STUB_ERR 0xbadca11 @@ -77,7 +74,6 @@ extern u32 __boot_cpu_mode[2]; void __hyp_set_vectors(phys_addr_t phys_vector_base); -phys_addr_t __hyp_get_vectors(void); void __hyp_reset_vectors(void); /* Reports the availability of HYP mode */ diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S index 8226fd9..d55604d 100644 --- a/arch/arm64/kernel/hyp-stub.S +++ b/arch/arm64/kernel/hyp-stub.S @@ -55,12 +55,7 @@ ENDPROC(__hyp_stub_vectors) .align 11 el1_sync: - cmp x0, #HVC_GET_VECTORS - b.ne 1f - mrs x0, vbar_el2 - b 9f - -1: cmp x0, #HVC_SET_VECTORS + cmp x0, #HVC_SET_VECTORS b.ne 2f msr vbar_el2, x1 b 9f @@ -118,12 +113,6 @@ ENDPROC(\label) * initialisation entry point. */ -ENTRY(__hyp_get_vectors) - mov x0, #HVC_GET_VECTORS - hvc #0 - ret -ENDPROC(__hyp_get_vectors) - ENTRY(__hyp_set_vectors) mov x1, x0 mov x0, #HVC_SET_VECTORS diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 0ad34fd..3734e63 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S @@ -124,12 +124,7 @@ __do_hyp_init: ENDPROC(__kvm_hyp_init) ENTRY(__kvm_handle_stub_hvc) - cmp x0, #HVC_GET_VECTORS - b.ne 1f - mrs x0, vbar_el2 - b exit - -1: cmp x0, #HVC_SOFT_RESTART + cmp x0, #HVC_SOFT_RESTART b.ne 1f /* This is where we're about to jump, staying at EL2 */ diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index f6f20b5..952f6cb 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -36,7 +36,7 @@ * passed in x0. * * A function pointer with a value less than 0xfff has a special meaning, - * and is used to implement __hyp_get_vectors in the same way as in + * and is used to implement hyp stubs in the same way as in * arch/arm64/kernel/hyp_stub.S. */ ENTRY(__kvm_call_hyp)