From patchwork Mon Mar 6 14:24:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9606849 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 8389460524 for ; Mon, 6 Mar 2017 14:44:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7629325D9E for ; Mon, 6 Mar 2017 14:44:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AA8D27F54; Mon, 6 Mar 2017 14:44: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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 0DC8528305 for ; Mon, 6 Mar 2017 14:44:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753256AbdCFOof (ORCPT ); Mon, 6 Mar 2017 09:44:35 -0500 Received: from foss.arm.com ([217.140.101.70]:36208 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbdCFOep (ORCPT ); Mon, 6 Mar 2017 09:34:45 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 337BE19BF; Mon, 6 Mar 2017 06:26:41 -0800 (PST) Received: from on-the-bus.cambridge.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 353553F220; Mon, 6 Mar 2017 06:26:39 -0800 (PST) From: Marc Zyngier To: Russell King , Ard Biesheuvel , Catalin Marinas , cdall@linaro.org, james.morse@arm.com Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH v3 17/25] ARM: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors Date: Mon, 6 Mar 2017 14:24:50 +0000 Message-Id: <20170306142458.8875-18-marc.zyngier@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170306142458.8875-1-marc.zyngier@arm.com> References: <20170306142458.8875-1-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We are now able to use the hyp stub to reset HYP mode. Time to kiss __kvm_hyp_reset goodbye, and use __hyp_reset_vectors. Signed-off-by: Marc Zyngier --- arch/arm/include/asm/kvm_asm.h | 2 -- arch/arm/include/asm/kvm_host.h | 2 +- arch/arm/kvm/init.S | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm/include/asm/kvm_asm.h b/arch/arm/include/asm/kvm_asm.h index 8ef05381984b..7ccb6f1aac5b 100644 --- a/arch/arm/include/asm/kvm_asm.h +++ b/arch/arm/include/asm/kvm_asm.h @@ -72,8 +72,6 @@ extern int __kvm_vcpu_run(struct kvm_vcpu *vcpu); extern void __init_stage2_translation(void); -extern void __kvm_hyp_reset(unsigned long); - extern u64 __vgic_v3_get_ich_vtr_el2(void); extern void __vgic_v3_init_lrs(void); #endif diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index cc495d799c67..d75638beca4e 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -274,7 +274,7 @@ static inline void __cpu_init_stage2(void) static inline void __cpu_reset_hyp_mode(unsigned long vector_ptr, phys_addr_t phys_idmap_start) { - kvm_call_hyp((void *)virt_to_idmap(__kvm_hyp_reset), vector_ptr); + __hyp_reset_vectors(); } static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext) diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S index 0da120b71c2e..7335a510eee4 100644 --- a/arch/arm/kvm/init.S +++ b/arch/arm/kvm/init.S @@ -129,7 +129,6 @@ ENTRY(__kvm_handle_stub_hvc) 1: cmp r0, #HVC_RESET_VECTORS bne 1f -ENTRY(__kvm_hyp_reset) /* We're now in idmap, disable MMU */ mrc p15, 4, r1, c1, c0, 0 @ HSCTLR ldr r0, =(HSCTLR_M | HSCTLR_A | HSCTLR_C | HSCTLR_I) @@ -151,7 +150,6 @@ ENTRY(__kvm_hyp_reset) exit: eret ENDPROC(__kvm_handle_stub_hvc) -ENDPROC(__kvm_hyp_reset) .ltorg