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: 9694983 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 BC90860245 for ; Sun, 23 Apr 2017 17:11:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5F8C26530 for ; Sun, 23 Apr 2017 17:11:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ADFC265B9; Sun, 23 Apr 2017 17:11:55 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 25B8F26530 for ; Sun, 23 Apr 2017 17:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163253AbdDWRLx (ORCPT ); Sun, 23 Apr 2017 13:11:53 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38673 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162706AbdDWRKS (ORCPT ); Sun, 23 Apr 2017 13:10:18 -0400 Received: by mail-wm0-f53.google.com with SMTP id r190so50452447wme.1 for ; Sun, 23 Apr 2017 10:10: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=hvLnmwzEYx6ZpDAcARDOuXj/0gbCNIzyu1rxV1EUf2GZR929XHy/P7BxPajqUZRW7N /mSHwErxzAV6SsvnU7VPCgZDqLARHPoqHE92cUqOfYq0xh/SGDkSDjUg2zlB/dJTvPKM dMp/KbTOLxfybJibKzyb10U3c9WjnpwFj5jbB/1QozHqzDQ4Fw7dCe2kw9qD4ddPGf6K U3OG5CcETLTsA8vCqwBDmog5riMxL+0LvBjDDY9cXgX3QyHM3RcdX0izSaNDcqKqfk3M 5ni1RLAa2kcYgBksZ/KQKOoAmx0gHpUkU4S9d9/AqVwZ78rzgmj9RKuwOTR5aBc+mvg3 J2ag== X-Gm-Message-State: AN3rC/66W4N9Sum7PG5yeU4ZvRXEdX5ZOcsaOAq7kDzYYvEVpH7Dxmgu HkNYvr8IiVI6Ao26 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?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall 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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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.