From patchwork Sun Apr 23 17:08:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9695159 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 09D10601E9 for ; Sun, 23 Apr 2017 17:32:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 054B5209D8 for ; Sun, 23 Apr 2017 17:32:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC4BA26419; Sun, 23 Apr 2017 17:32:38 +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 81FF1209D8 for ; Sun, 23 Apr 2017 17:32:38 +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=QfSosGrJWn5vzl9s1ez3wdBMAq+aQQ6KWpRuTg8okRA=; b=GuCBprW0bYZmuPAHmRlFcpHBLp Tz1yXOjLPaQe22gr/3w+73SvMVBIEVOQfoDF3O6Z2WjmrTeYi8qas+LMMOweVfJX6vOSRUQ1aAvOf KApqA6HYR7CE+/Jsqbu43UoGZgWtCOggT72BjBv3YCsabaUIVOFRNh1XMXBf/3M3glFK/EZEMd3Qu 9opJsgTqZ1XX8F4yD8pC88lAGpkf4XE+zeW4aem+FhcfNRV4IT5MQoIiUCt+jTKDjCUYeaHIHGSKd WrCpJQ9pCN/ZJt9ft9kK09xoGC7WclYXpoQPN4TxL5yKxx+KrVikXh/xBCypzFae3JDVti8fjvHHn QbbZno8w==; 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 1d2LNE-0004Vb-MZ; Sun, 23 Apr 2017 17:32:36 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2LLw-0002ZO-H7 for linux-arm-kernel@bombadil.infradead.org; Sun, 23 Apr 2017 17:31:16 +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=0NCd6ZQ1Hb+UITgNuPF2BIHP8Iwoa6RDeFqY6hgYe9o=; b=CzCVPqedAgBKUBaR5/nGxQijS JQ5vV0CL4sp2tWQzNn49I1HYQaNMeF3J9alYPCsvG/SIngiiRLO6aPnwvVc9KJUR5MeCLAci1vFbV 81bCbY8v1Oan58iSbleulkdu3NGFLlOchl9oFAPvHqzV6RJA5QTjtWckNPx/yM1wlZJoJbx3oghmh LKKWMkDr1vJDn++AqBDFBex0PEWmuBfRLKUzp0Z9uZc0CRPt8wl7OOFdeLzS9Vi1bJBdgxybblA4f J7vlGHakK+EPeKtiaHyrf2+04YxDsk0KMF+0iiWG1+vcnjxgODQ9LhtM8uhEA01LLqRy/OKy3jB0e 1N533OK3w==; Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2L3u-0005Nq-F8 for linux-arm-kernel@lists.infradead.org; Sun, 23 Apr 2017 17:12:39 +0000 Received: by mail-wm0-x233.google.com with SMTP id r190so50452446wme.1 for ; Sun, 23 Apr 2017 10:12:18 -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=0NCd6ZQ1Hb+UITgNuPF2BIHP8Iwoa6RDeFqY6hgYe9o=; b=OIvjIW2QKehq6Zewh7YJ9awNtb+t9IjiWrbG1eliOfISWpHVZRVlU21LEwyZ+2SopC nH3qzl7l6usbZZHtO2FAKEfPEkGp33oP0XSFppiCXb2OMsPQf6wiulHXM3Vr6dEe4aUZ U6toA7A6nrlLJZZ3eo4HsebbktJpC59d383+I= 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=0NCd6ZQ1Hb+UITgNuPF2BIHP8Iwoa6RDeFqY6hgYe9o=; b=kSPNWxJK0rIgm6kRGUEmieVOLeOELfFP3xCqqDoZe3fWUsL0r9D7Xoput+kAUnM5YC kO+nY0DkNAHYhMi2QwMF4Vz60CAztZp0DPkfU1T0H6728siwbiKGP2C43xzGwnnPb/jr Zm8FcMg59BbXjS7qrSwu/KWYIDCQK8oQgHbKbwCoZwg+24rGTm4GFAKOYnG6pUrYPmAw QRXu+ePRLFkTiX21J5L3bAI5T8Nqzhl38nvlE+23sNSsK9eQU7Nq6EDprw+LsRnmxJpJ s8WCjnHdxYgkAo5FcQMDGwrtuqcwWHkDwnhXHdyD3clX9Pix93+x1J56/KKOxmxjz7Og K24A== X-Gm-Message-State: AN3rC/71MX0NsVQO6iTuInJD1Vrg1XhnniHvOlnRYZ+FQSDSJSujqrDv mP27PcFlhyPXlTWX X-Received: by 10.80.164.27 with SMTP id u27mr129616edb.49.1492967416664; Sun, 23 Apr 2017 10:10:16 -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.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:10:16 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 43/79] arm64: KVM: Implement HVC_GET_VECTORS in the init code Date: Sun, 23 Apr 2017 19:08:53 +0200 Message-Id: <20170423170929.27334-44-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_131238_645579_D4A07084 X-CRM114-Status: UNSURE ( 9.31 ) 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: 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 Now that we have an infrastructure to handle hypercalls in the KVM init code, let's implement HVC_GET_VECTORS there. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- 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 5e39ad5..fded932 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.