From patchwork Tue Mar 21 19:20:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9637507 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 A438B601E9 for ; Tue, 21 Mar 2017 19:29:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 955B227C14 for ; Tue, 21 Mar 2017 19:29:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A38028304; Tue, 21 Mar 2017 19:29:33 +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 1F9E727C14 for ; Tue, 21 Mar 2017 19:29:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757565AbdCUTZJ (ORCPT ); Tue, 21 Mar 2017 15:25:09 -0400 Received: from foss.arm.com ([217.140.101.70]:59236 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933117AbdCUTYc (ORCPT ); Tue, 21 Mar 2017 15:24:32 -0400 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 56EEA15A2; Tue, 21 Mar 2017 12:21:58 -0700 (PDT) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.207.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BB4503F2E5; Tue, 21 Mar 2017 12:21:56 -0700 (PDT) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: Russell King , Christoffer Dall , Mark Rutland , Catalin Marinas , James Morse , Ard Biesheuvel , Keerthy Subject: [PATCH v4 06/28] arm64: KVM: Implement HVC_GET_VECTORS in the init code Date: Tue, 21 Mar 2017 19:20:36 +0000 Message-Id: <20170321192058.9300-7-marc.zyngier@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170321192058.9300-1-marc.zyngier@arm.com> References: <20170321192058.9300-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 Now that we have an infrastructure to handle hypercalls in the KVM init code, let's implement HVC_GET_VECTORS there. Reviewed-by: James Morse Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp-init.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 6cf98ccd10f2..1d89995378e9 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S @@ -124,7 +124,12 @@ __do_hyp_init: ENDPROC(__kvm_hyp_init) ENTRY(__kvm_handle_stub_hvc) - cmp x0, #HVC_RESET_VECTORS + cmp x0, #HVC_GET_VECTORS + b.ne 1f + mrs x0, vbar_el2 + b exit + +1: cmp x0, #HVC_RESET_VECTORS b.ne 1f /* * Reset kvm back to the hyp stub.