Thread (36 messages) 36 messages, 2 authors, 2017-04-04
STALE3400d REVIEWED: 6 (5M)
Revisions (2)
  1. v4 [diff vs current]
  2. v5 current

[PATCH v5 21/34] ARM: KVM: Implement HVC_GET_VECTORS in the init code

From: Marc Zyngier <hidden>
Date: 2017-04-03 18:37:54
Also in: kvm, kvmarm
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

Now that we have an infrastructure to handle hypercalls in the KVM
init code, let's implement HVC_GET_VECTORS there.

Tested-by: Keerthy <j-keerthy@ti.com>
Acked-by: Russell King <redacted>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <redacted>
---
 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 86a7008e75a3..d6b2f496fa13 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 */
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help