Skip to content

Commit

Permalink
ARM: KVM: Convert KVM to use HVC_GET_VECTORS
Browse files Browse the repository at this point in the history
The conversion of the HYP stub ABI to something similar to arm64
left the KVM code broken, as it doesn't know about the new
stub numbering. Let's move the various #defines to virt.h, and
let KVM use HVC_GET_VECTORS.

Tested-by: Keerthy <j-keerthy@ti.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
  • Loading branch information
Marc Zyngier authored and Christoffer Dall committed Apr 9, 2017
1 parent 9da5ac2 commit 467f97b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 8 additions & 0 deletions arch/arm/include/asm/virt.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ extern char __hyp_text_start[];
extern char __hyp_text_end[];
#endif

#else

/* Only assembly code should need those */

#define HVC_GET_VECTORS 0
#define HVC_SET_VECTORS 1
#define HVC_SOFT_RESTART 2

#endif /* __ASSEMBLY__ */

#endif /* ! VIRT_H */
4 changes: 0 additions & 4 deletions arch/arm/kernel/hyp-stub.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
#include <asm/assembler.h>
#include <asm/virt.h>

#define HVC_GET_VECTORS 0
#define HVC_SET_VECTORS 1
#define HVC_SOFT_RESTART 2

#ifndef ZIMAGE
/*
* For the kernel proper, we need to find out the CPU boot mode long after
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kvm/hyp/hyp-entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ hyp_hvc:
pop {r0, r1, r2}

/* Check for __hyp_get_vectors */
cmp r0, #-1
cmp r0, #HVC_GET_VECTORS
mrceq p15, 4, r0, c12, c0, 0 @ get HVBAR
beq 1f

Expand Down

0 comments on commit 467f97b

Please sign in to comment.