From patchwork Sun Apr 23 17:09:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9695107 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 00C0060245 for ; Sun, 23 Apr 2017 17:19:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E47DE26530 for ; Sun, 23 Apr 2017 17:19:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D62C4267EC; Sun, 23 Apr 2017 17:19:23 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D5BD26530 for ; Sun, 23 Apr 2017 17:19:23 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=Oy8L5cquZG6hh9QmmofZAlIbPlHEiRktghJ+b7BPGFk=; b=HY4/0jIDY2ma/VIuAwWXoUJR/U kT0YVpIwb2MWb0ZXhqK85YvQ1aRhYcyNcHRotcjAptcPVo2xVkJvzxR1H84nbo/aZiBbA0ya82+29 gHUl89tubLOke47ZR5Cnql1FrHTPHlCUrgfkQWQmSlB/VHLgO/gQuFTVEBbDIoQnMJHTUXIDMfIL7 +zK09d4HRN0xHt6q2bTljsXkOYjGit54a/ESYXtixknnLLSOZAjrq1QBKNWqC6XH6S+gSh+pPoGm3 mA2C9bnTDwnhwhb+zccBCHA1Uyce5xk9HHZ9cigLBJBVJRHjBiWqVsb1kO5jPI51MFmQW6Y5F0Nrl tFALCR+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d2LAQ-0000bc-BK; Sun, 23 Apr 2017 17:19:22 +0000 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2L2E-0006UZ-Vo for linux-arm-kernel@lists.infradead.org; Sun, 23 Apr 2017 17:11:10 +0000 Received: by mail-wr0-x22b.google.com with SMTP id z52so37736486wrc.2 for ; Sun, 23 Apr 2017 10:10:34 -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=Ai70rYeBEFyDYv3I4WWyRzOdb1GjYfQLolWDsXdQz4k=; b=Ipw2Y7obJMwpe6RhDgBLfaH/WQK7k0Xjy3D3sJizrz8jxfMeJGKzmLIj5Qxj3IkJdv mErud6xjvxDw9I9SU4DEpFCjiLh3c7WLvFemIfIQGCDBYZsCNqQOG8X9GGG0wo1/xg/E m0e3zr0yZoDMubcqSBv+M6K+a9mXLsLbnLc/Y= 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=Ai70rYeBEFyDYv3I4WWyRzOdb1GjYfQLolWDsXdQz4k=; b=R11RJp74Dhw5ombJyt5tnRbRXiWCEX7vVzTaF2EGgsnmn+bp7kT/ssRBf0utM3eT1P ZPn0p3YvqhTZd7nQ/9ttSBisXcmXhA9WjW+XnVj57t5dntnQcyW7A5JT10uL5hjadZx2 Ds6XqViQHgW+kJoYU2qyyQ8jc7KRJK7q39dUKhZwchCDWWU9MAgT/0182oOCh8DYb73Y fi1CLs3YxzIRtM7AW2XRKxmdDBT3dfSYoEFvdpgspdlm/OkXdJg6YoxcPFv8gApqAl1S SI+pOPVFxlqgcq9FviUJhsaMmJiL5G6ImUUh2gj24On2BqOupkVi1hURnGdPiNJcuiGM degw== X-Gm-Message-State: AN3rC/78dmkyCpTt+knbKrbCvZw2nT+AYtEqbyu55xyshjHncNCED8m7 fQc/+uKWt6GIVIpZ X-Received: by 10.223.147.225 with SMTP id 88mr2669598wrp.146.1492967433047; Sun, 23 Apr 2017 10:10:33 -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.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:10:32 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 58/79] ARM: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors Date: Sun, 23 Apr 2017 19:09:08 +0200 Message-Id: <20170423170929.27334-59-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170423_101055_599404_F2F2F210 X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier 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. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- 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 dd16044..eae11b3 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 u64 __vgic_v3_read_vmcr(void); extern void __vgic_v3_write_vmcr(u32 vmcr); diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 31ee468..adea307 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -273,7 +273,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 d6b2f49..fb33609 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