From patchwork Tue Mar 21 19:20:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9637519 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 428C7601E9 for ; Tue, 21 Mar 2017 19:31:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 336EE27C14 for ; Tue, 21 Mar 2017 19:31:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2822528304; Tue, 21 Mar 2017 19:31:25 +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=ham 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 AA8FD27C14 for ; Tue, 21 Mar 2017 19:31:24 +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=U3aWJCVGuAm8xiOVEe+CX7aN5ZcKtfEbajG80fTed9Q=; b=dEqCfA3/dzN6jm1wiz2oZNul/H XTa4/t0kOn1BOxC9nPW6bqnxvHfwjO8L6yR4fuT9+17Vg9vF6CkkrucpGQPO+aYTnfGwTQOrl4KkN 4hk1kiIqK0s2OsZ6ye2h/CwNWaZ261a+wv8uTgshxvgG+IFeKP3UDv2kX3tYNcr5Oh6I01SgbDAFV komk3lJPW0SEp8CJPipPfKZbv5rKcftxhjQc3z9HInKsmPdjKHb9lfzbTFL44pbrJlF6AxaEIXAKu kbsaaUzUxYxKSnZzj2RcAXtx/sUfW5ENOzmxx2H+MFJrmBF/q2UcCtnZmlTmpIUOHeRE8U73fLgf9 cX2dFzgw==; 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 1cqPV3-0006Xw-Tf; Tue, 21 Mar 2017 19:31:21 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqPMu-0003vx-BY for linux-arm-kernel@bombadil.infradead.org; Tue, 21 Mar 2017 19:22:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5S2IqoQ9KQS9oQwoqaZoMeRdLJ/LcNDUsSN6Fy7gjw4=; b=1ZkW14nY7lRWh6SZu7BTGMgod /yAiibJbuxbCBS1pNpa5p/TyYRrxqyVNJ1p+WVn4pgw/yrR3eYDBIUKd3lweIL5WyH0jphClhYPaP 0oOHvndZ5PnE4gfdemWE7W3BbqlsSF3JPbSSzTDqsZK9GJt/SI/UcwPFiuYacsoSkZ+c0vJXyxL3L DouCPXbAvkvuv/ZZrQOCD7AofI34w7zQcyoBTDQpxLm/K6DLqrPyuP6tn3fX+2IYcs8RnWOXQh0lM D7h5p3ThUvmZVmdjBkwrB0bvtTUJz3yYfkDoJ/1ZSNuf+RPMP2P1UN/KL6XGCFu84Z6wYXQR6Zpcn 9pxKx/rRg==; Received: from foss.arm.com ([217.140.101.70]) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cqPMq-0005Nx-TD for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2017 19:22:54 +0000 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 ED44E199B; Tue, 21 Mar 2017 12:22:22 -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 2A4263F2E5; Tue, 21 Mar 2017 12:22:21 -0700 (PDT) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH v4 18/28] ARM: KVM: Implement HVC_GET_VECTORS in the init code Date: Tue, 21 Mar 2017 19:20:48 +0000 Message-Id: <20170321192058.9300-19-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170321_152253_060743_06C201BF X-CRM114-Status: UNSURE ( 7.32 ) X-CRM114-Notice: Please train this message. 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: Mark Rutland , Russell King , Ard Biesheuvel , Catalin Marinas , James Morse , Keerthy , Christoffer Dall 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 Now that we have an infrastructure to handle hypercalls in the KVM init code, let's implement HVC_GET_VECTORS there. Tested-by: Keerthy Acked-by: Russell King Signed-off-by: Marc Zyngier --- arch/arm/kvm/init.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S index 9b0c735a68f7..0da120b71c2e 100644 --- a/arch/arm/kvm/init.S +++ b/arch/arm/kvm/init.S @@ -122,7 +122,12 @@ __do_hyp_init: eret ENTRY(__kvm_handle_stub_hvc) - cmp r0, #HVC_RESET_VECTORS + cmp r0, #HVC_GET_VECTORS + bne 1f + mrc p15, 4, r0, c12, c0, 0 @ get HVBAR + b exit + +1: cmp r0, #HVC_RESET_VECTORS bne 1f ENTRY(__kvm_hyp_reset) /* We're now in idmap, disable MMU */