diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-04-03 20:37:39 +0200 |
---|---|---|
committer | Christoffer Dall <cdall@linaro.org> | 2017-04-09 16:49:20 +0200 |
commit | fd0e0c617089e7ba8333c55bd2e318dfc128bf33 (patch) | |
tree | 06b1b4d4fafeda0c6670b4b2c1ec4d52e8707bdd /arch/arm64/include/asm/virt.h | |
parent | arm64: hyp-stub: Update documentation in asm/virt.h (diff) | |
download | linux-fd0e0c617089e7ba8333c55bd2e318dfc128bf33.tar.xz linux-fd0e0c617089e7ba8333c55bd2e318dfc128bf33.zip |
arm64: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall
Let's define a new stub hypercall that resets the HYP configuration
to its default: hyp-stub vectors, and MMU disabled.
Of course, for the hyp-stub itself, this is a trivial no-op.
Hypervisors will have a bit more work to do.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'arch/arm64/include/asm/virt.h')
-rw-r--r-- | arch/arm64/include/asm/virt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h index 1569c3a0d794..435514c52b0f 100644 --- a/arch/arm64/include/asm/virt.h +++ b/arch/arm64/include/asm/virt.h @@ -44,6 +44,14 @@ */ #define HVC_SOFT_RESTART 2 +/* + * HVC_RESET_VECTORS - Restore the vectors to the original HYP stubs + */ +#define HVC_RESET_VECTORS 3 + +/* Max number of HYP stub hypercalls */ +#define HVC_STUB_HCALL_NR 4 + /* Error returned when an invalid stub number is passed into x0 */ #define HVC_STUB_ERR 0xbadca11 @@ -70,6 +78,7 @@ extern u32 __boot_cpu_mode[2]; void __hyp_set_vectors(phys_addr_t phys_vector_base); phys_addr_t __hyp_get_vectors(void); +void __hyp_reset_vectors(void); /* Reports the availability of HYP mode */ static inline bool is_hyp_mode_available(void) |