From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:09
As noticed by RMK in this thread[1], the hyp-stub API on 32bit ARM
could do with some TLC (it cannot perform a soft-restart at HYP, and
has holes in the hyp-stub support in a number of places).
This series implements the following:
- Add HVC_[GS]ET_VECTORS and HVC_SOFT_RESTART to the 32bit code
- Add HVC_RESET_VECTORS to both arm and arm64, removing the need for
__hyp_reset_vectors
- Implement add the stub entry points in the KVM init code, which
didn't implement any so far
- Convert the HYP code to use the init code stubs directly
- Add some API documentation that covers the above
Patches 9 and 10 would be better squashed into 7 and 8, but I've kept
separate so that I can take the blame for everything I've broken.
This has been tested on arm and arm64, both as host and guest.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-December/473472.html
Marc Zyngier (18):
arm64: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall
arm64: KVM: Implement HVC_RESET_VECTORS stub hypercall
arm64: KVM: Implement HVC_GET_VECTORS in the init code
arm64: KVM: Allow the main HYP code to use the init hyp stub
implementation
arm64: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors
arm64: KVM: Implement HVC_SOFT_RESTART in the init code
ARM: KVM: Convert KVM to use HVC_GET_VECTORS
ARM: hyp-stub: Use r1 for the soft-restart address
ARM: Expose the VA/IDMAP offset
ARM: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall
ARM: KVM: Implement HVC_RESET_VECTORS stub hypercall
ARM: KVM: Implement HVC_GET_VECTORS in the init code
ARM: KVM: Allow the main HYP code to use the init hyp stub
implementation
ARM: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors
ARM: KVM: Implement HVC_SOFT_RESTART in the init code
arm/arm64: KVM: Simplify __cpu_reset_hyp_mode
arm/arm64: KVM: Remove kvm_get_idmap_start
arm/arm64: Add hyp-stub API documentation
Russell King (2):
ARM: hyp-stub: improve ABI
ARM: soft-reboot into same mode that we entered the kernel
Documentation/virtual/kvm/arm/hyp-abi.txt | 48 +++++++++++++++++++++++++
arch/arm/include/asm/kvm_asm.h | 2 --
arch/arm/include/asm/kvm_host.h | 6 ++--
arch/arm/include/asm/kvm_mmu.h | 1 -
arch/arm/include/asm/proc-fns.h | 4 +--
arch/arm/include/asm/virt.h | 11 ++++++
arch/arm/kernel/hyp-stub.S | 44 ++++++++++++++++++++---
arch/arm/kernel/reboot.c | 7 ++--
arch/arm/kvm/arm.c | 3 +-
arch/arm/kvm/hyp/hyp-entry.S | 29 +++++++++++++---
arch/arm/kvm/init.S | 58 ++++++++++++++++++++++++++-----
arch/arm/kvm/mmu.c | 5 ---
arch/arm/mm/mmu.c | 5 +++
arch/arm/mm/proc-v7.S | 12 ++++---
arch/arm64/include/asm/kvm_asm.h | 1 -
arch/arm64/include/asm/kvm_host.h | 7 ++--
arch/arm64/include/asm/kvm_mmu.h | 1 -
arch/arm64/include/asm/virt.h | 8 +++++
arch/arm64/kernel/hyp-stub.S | 13 ++++++-
arch/arm64/kvm/hyp-init.S | 50 ++++++++++++++++++++------
arch/arm64/kvm/hyp/hyp-entry.S | 39 ++++++++++-----------
21 files changed, 278 insertions(+), 76 deletions(-)
create mode 100644 Documentation/virtual/kvm/arm/hyp-abi.txt
--
2.11.0
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:10
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.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm64/include/asm/virt.h | 8 ++++++++
arch/arm64/kernel/hyp-stub.S | 13 ++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:11
In order to restore HYP mode to its original condition, KVM currently
implements __kvm_hyp_reset(). As we're moving towards a hyp-stub
defined API, it becomes necessary to implement HVC_RESET_VECTORS.
This patch adds the HVC_RESET_VECTORS hypercall to the KVM init
code, which so far lacked any form of hypercall support.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm64/kvm/hyp-init.S | 12 ++++++++++++
1 file changed, 12 insertions(+)
In order to restore HYP mode to its original condition, KVM currently
implements __kvm_hyp_reset(). As we're moving towards a hyp-stub
defined API, it becomes necessary to implement HVC_RESET_VECTORS.
This patch adds the HVC_RESET_VECTORS hypercall to the KVM init
code, which so far lacked any form of hypercall support.
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:12
Now that we have an infrastructure to handle hypercalls in the KVM
init code, let's implement HVC_GET_VECTORS there.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm64/kvm/hyp-init.S | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:13
We now have a full hyp-stub implementation in the KVM init code,
but the main KVM code only supports HVC_GET_VECTORS, which is not
enough.
Instead of reinventing the wheel, let's reuse the init implementation
by branching to the idmap page when called with a hyp-stub hypercall.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm64/kvm/hyp/hyp-entry.S | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:14
We are now able to use the hyp stub to reset HYP mode. Time to
kiss __kvm_hyp_reset goodbye, and use __hyp_reset_vectors.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm64/include/asm/kvm_asm.h | 1 -
arch/arm64/include/asm/kvm_host.h | 4 ++--
arch/arm64/kvm/hyp-init.S | 2 --
arch/arm64/kvm/hyp/hyp-entry.S | 15 ---------------
4 files changed, 2 insertions(+), 20 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:15
Another missing stub hypercall is HVC_SOFT_RESTART. It turns out
that it is pretty easy to implement in terms of HVC_RESET_VECTORS
(since it needs to turn the MMU off).
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm64/kvm/hyp-init.S | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
@@ -129,21 +129,36 @@ ENTRY(__kvm_handle_stub_hvc)mrsx0,vbar_el2bexit+1:cmpx0,#HVC_SOFT_RESTART+b.ne1f++/*Thisiswherewe're about to jump, staying at EL2 */+msrelr_el2,x1+movx0,#(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT | PSR_MODE_EL2h)+msrspsr_el2,x0++/*Shufflethearguments,anddon't come back */+movx0,x2+movx1,x3+movx2,x4+breset+1:cmpx0,#HVC_RESET_VECTORSb.ne1f+reset:/*-*Resetkvmbacktothehypstub.+*Resetkvmbacktothehypstub.Donotclobberx0-x4in+*casewecomingviaHVC_SOFT_RESTART.*/-/*We're now in idmap, disable MMU */-mrsx0,sctlr_el2-ldrx1,=SCTLR_ELx_FLAGS-bicx0,x0,x1//ClearSCTL_Mandetc-msrsctlr_el2,x0+mrsx5,sctlr_el2+ldrx6,=SCTLR_ELx_FLAGS+bicx5,x5,x6//ClearSCTL_Mandetc+msrsctlr_el2,x5isb/*Installstubvectors*/-adr_lx0,__hyp_stub_vectors-msrvbar_el2,x0+adr_lx5,__hyp_stub_vectors+msrvbar_el2,x5bexit1:movx0,#-1
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:16
From: Russell King <redacted>
Improve the hyp-stub ABI to allow it to do more than just get/set the
vectors. We follow the example in ARM64, where r0 is used as an opcode
with the other registers as an argument.
Signed-off-by: Russell King <redacted>
---
arch/arm/kernel/hyp-stub.S | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:17
From: Russell King <redacted>
When we soft-reboot (eg, kexec) from one kernel into the next, we need
to ensure that we enter the new kernel in the same processor mode as
when we were entered, so that (eg) the new kernel can install its own
hypervisor - the old kernel's hypervisor will have been overwritten.
In order to do this, we need to pass a flag to cpu_reset() so it knows
what to do, and we need to modify the kernel's own hypervisor stub to
allow it to handle a soft-reboot.
As we are always guaranteed to install our own hypervisor if we're
entered in HYP32 mode, and KVM will have moved itself out of the way
on kexec/normal reboot, we can assume that our hypervisor is in place
when we want to kexec, so changing our hypervisor API should not be a
problem.
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Russell King <redacted>
---
arch/arm/include/asm/proc-fns.h | 4 ++--
arch/arm/kernel/hyp-stub.S | 13 +++++++++++++
arch/arm/kernel/reboot.c | 7 +++++--
arch/arm/mm/proc-v7.S | 12 ++++++++----
4 files changed, 28 insertions(+), 8 deletions(-)
@@ -88,7 +88,7 @@ extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte);#elseexternvoidcpu_set_pte_ext(pte_t*ptep,pte_tpte,unsignedintext);#endif-externvoidcpu_reset(unsignedlongaddr)__attribute__((noreturn));+externvoidcpu_reset(unsignedlongaddr,boolhvc)__attribute__((noreturn));/* These three are private to arch/arm/kernel/suspend.c */externvoidcpu_do_suspend(void*);
@@ -51,7 +52,9 @@ static void __soft_restart(void *addr)/* Switch to the identity mapping. */phys_reset=(phys_reset_t)virt_to_idmap(cpu_reset);-phys_reset((unsignedlong)addr);++/* original stub should be restored by kvm */+phys_reset((unsignedlong)addr,is_hyp_mode_available());/* Should never get here. */BUG();
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:18
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.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/include/asm/virt.h | 8 ++++++++
arch/arm/kernel/hyp-stub.S | 4 ----
arch/arm/kvm/hyp/hyp-entry.S | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:19
It is not really obvious why the restart address should be in r3
when communicated to the hyp-stub. r1 should be perfectly adequate,
and consistent with the rest of the code.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kernel/hyp-stub.S | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
On 17 February 2017 at 15:44, Marc Zyngier [off-list ref] wrote:
quoted hunk
It is not really obvious why the restart address should be in r3
when communicated to the hyp-stub. r1 should be perfectly adequate,
and consistent with the rest of the code.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kernel/hyp-stub.S | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-19 11:09:54
On Sun, 19 Feb 2017 08:22:23 +0000
Ard Biesheuvel [off-list ref] wrote:
On 17 February 2017 at 15:44, Marc Zyngier [off-list ref] wrote:
quoted
It is not really obvious why the restart address should be in r3
when communicated to the hyp-stub. r1 should be perfectly adequate,
and consistent with the rest of the code.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kernel/hyp-stub.S | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
I'm now very confused too. I just gave it another go on my A7 platform,
and it restarted just right, even if there is obviously junk in r1.
Guess I'm just bloody lucky.
Thanks for the heads up, I'll fix that for v2.
M.
--
Without deviation from the norm, progress is not possible.
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:20
The KVM code needs to be able to compute the address of
symbols in its idmap page (the equivalent of a virt_to_idmap()
call). Unfortunately, virt_to_idmap is slightly complicated,
depending on the use of arch_phys_to_idmap_offset or not, and
none of that is readily available at HYP.
Instead, expose a single kimage_voffset variable which contains the
offset between a kernel VA and its idmap address, enabling the
VA->IDMAP conversion. This allows the KVM code to behave similarily
to its arm64 counterpart.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/mm/mmu.c | 5 +++++
1 file changed, 5 insertions(+)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:21
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.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/include/asm/virt.h | 3 +++
arch/arm/kernel/hyp-stub.S | 11 ++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:22
In order to restore HYP mode to its original condition, KVM currently
implements __kvm_hyp_reset(). As we're moving towards a hyp-stub
defined API, it becomes necessary to implement HVC_RESET_VECTORS.
This patch adds the HVC_RESET_VECTORS hypercall to the KVM init
code, which so far lacked any form of hypercall support.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kernel/hyp-stub.S | 1 +
arch/arm/kvm/init.S | 37 +++++++++++++++++++++++++++++++------
2 files changed, 32 insertions(+), 6 deletions(-)
On 17 February 2017 at 15:44, Marc Zyngier [off-list ref] wrote:
quoted hunk
In order to restore HYP mode to its original condition, KVM currently
implements __kvm_hyp_reset(). As we're moving towards a hyp-stub
defined API, it becomes necessary to implement HVC_RESET_VECTORS.
This patch adds the HVC_RESET_VECTORS hypercall to the KVM init
code, which so far lacked any form of hypercall support.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kernel/hyp-stub.S | 1 +
arch/arm/kvm/init.S | 37 +++++++++++++++++++++++++++++++------
2 files changed, 32 insertions(+), 6 deletions(-)
@@ -112,22 +121,38 @@ __do_hyp_init:eret-@r0:stubvectorsaddress+ENTRY(__kvm_handle_stub_hvc)+cmpr0,#HVC_RESET_VECTORS+bne1fENTRY(__kvm_hyp_reset)/*We're now in idmap, disable MMU */mrcp15,4,r1,c1,c0,0@HSCTLR-ldrr2,=(HSCTLR_M|HSCTLR_A|HSCTLR_C|HSCTLR_I)-bicr1,r1,r2+ldrr0,=(HSCTLR_M|HSCTLR_A|HSCTLR_C|HSCTLR_I)+bicr1,r1,r0mcrp15,4,r1,c1,c0,0@HSCTLR-/*Installstubvectors*/-mcrp15,4,r0,c12,c0,0@HVBAR-isb+/*+*Installstubvectors.Wecannotuse'adr'togettothe+*stubvectors,hencehavingtoplaytheVA->PAgame.+*/+adrr0,.L__va2pa@PA+ldrr1,[r0]@VA+subr0,r0,r1@PA-VA+ldrr1,=__hyp_stub_vectors
Since we're guaranteed to be on v7, how about something like
0:adr r0, 0b
movw r1, #:lower16:__hyp_stub_vectors - 0b
movt r1, #:upper16:__hyp_stub_vectors - 0b
From: Marc Zyngier <hidden> Date: 2017-02-19 11:19:50
On Sun, 19 Feb 2017 08:07:22 +0000
Ard Biesheuvel [off-list ref] wrote:
On 17 February 2017 at 15:44, Marc Zyngier [off-list ref] wrote:
quoted
In order to restore HYP mode to its original condition, KVM currently
implements __kvm_hyp_reset(). As we're moving towards a hyp-stub
defined API, it becomes necessary to implement HVC_RESET_VECTORS.
This patch adds the HVC_RESET_VECTORS hypercall to the KVM init
code, which so far lacked any form of hypercall support.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kernel/hyp-stub.S | 1 +
arch/arm/kvm/init.S | 37 +++++++++++++++++++++++++++++++------
2 files changed, 32 insertions(+), 6 deletions(-)
@@ -112,22 +121,38 @@ __do_hyp_init:eret-@r0:stubvectorsaddress+ENTRY(__kvm_handle_stub_hvc)+cmpr0,#HVC_RESET_VECTORS+bne1fENTRY(__kvm_hyp_reset)/*We're now in idmap, disable MMU */mrcp15,4,r1,c1,c0,0@HSCTLR-ldrr2,=(HSCTLR_M|HSCTLR_A|HSCTLR_C|HSCTLR_I)-bicr1,r1,r2+ldrr0,=(HSCTLR_M|HSCTLR_A|HSCTLR_C|HSCTLR_I)+bicr1,r1,r0mcrp15,4,r1,c1,c0,0@HSCTLR-/*Installstubvectors*/-mcrp15,4,r0,c12,c0,0@HVBAR-isb+/*+*Installstubvectors.Wecannotuse'adr'togettothe+*stubvectors,hencehavingtoplaytheVA->PAgame.+*/+adrr0,.L__va2pa@PA+ldrr1,[r0]@VA+subr0,r0,r1@PA-VA+ldrr1,=__hyp_stub_vectors
Since we're guaranteed to be on v7, how about something like
0:adr r0, 0b
movw r1, #:lower16:__hyp_stub_vectors - 0b
movt r1, #:upper16:__hyp_stub_vectors - 0b
Ah, very nice! It hurts my brain, but it is very nice indeed! I'll
borrow that for v2.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
On 17 February 2017 at 15:44, Marc Zyngier [off-list ref] wrote:
quoted hunk
In order to restore HYP mode to its original condition, KVM currently
implements __kvm_hyp_reset(). As we're moving towards a hyp-stub
defined API, it becomes necessary to implement HVC_RESET_VECTORS.
This patch adds the HVC_RESET_VECTORS hypercall to the KVM init
code, which so far lacked any form of hypercall support.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kernel/hyp-stub.S | 1 +
arch/arm/kvm/init.S | 37 +++++++++++++++++++++++++++++++------
2 files changed, 32 insertions(+), 6 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:23
Now that we have an infrastructure to handle hypercalls in the KVM
init code, let's implement HVC_GET_VECTORS there.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kvm/init.S | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:24
We now have a full hyp-stub implementation in the KVM init code,
but the main KVM code only supports HVC_GET_VECTORS, which is not
enough.
Instead of reinventing the wheel, let's reuse the init implementation
by branching to the idmap page when called with a hyp-stub hypercall.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kvm/hyp/hyp-entry.S | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:25
We are now able to use the hyp stub to reset HYP mode. Time to
kiss __kvm_hyp_reset goodbye, and use __hyp_reset_vectors.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/include/asm/kvm_asm.h | 2 --
arch/arm/include/asm/kvm_host.h | 3 ++-
arch/arm/kvm/init.S | 2 --
3 files changed, 2 insertions(+), 5 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:26
Another missing stub hypercall is HVC_SOFT_RESTART. It turns out
that it is pretty easy to implement in terms of HVC_RESET_VECTORS
(since it needs to turn the MMU off).
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/kvm/init.S | 14 ++++++++++++++
1 file changed, 14 insertions(+)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:27
__cpu_reset_hyp_mode doesn't need to be passed any argument now,
as the hyp-stub implementations are self-contained.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/include/asm/kvm_host.h | 3 +--
arch/arm/kvm/arm.c | 3 +--
arch/arm64/include/asm/kvm_host.h | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:28
With __cpu_reset_hyp_mode having become fairly dumb, there is no
need for kvm_get_idmap_start anymore.
Signed-off-by: Marc Zyngier <redacted>
---
arch/arm/include/asm/kvm_mmu.h | 1 -
arch/arm/kvm/mmu.c | 5 -----
arch/arm64/include/asm/kvm_mmu.h | 1 -
3 files changed, 7 deletions(-)
From: Marc Zyngier <hidden> Date: 2017-02-17 15:44:29
In order to help people understanding the hyp-stub API that exists
between the host kernel and the hypervisor mode (whether a hypervisor
has been installed or not), let's document said API.
As as with any form of documentation, I expect it to become obsolete
and completely misleading within 20 minutes after having being merged.
Signed-off-by: Marc Zyngier <redacted>
---
Documentation/virtual/kvm/arm/hyp-abi.txt | 48 +++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 Documentation/virtual/kvm/arm/hyp-abi.txt
@@ -0,0 +1,48 @@+* Internal ABI between the kernel and HYP++This file documents the interaction between the Linux kernel and the+hypervisor layer when running Linux as a hypervisor (for example+KVM). It doesn't cover the interaction of the kernel with the+hypervisor when running as a guest (under Xen, KVM or any other+hypervisor), or any hypervisor-specific interaction when the kernel is+used as a host.++On arm and arm64 (without VHE), the kernel doesn't run in hypervisor+mode, but still needs to interact with it, allowing a built-in+hypervisor to be either installed or torn down.++In order to achieve this, the kernel must be booted at HYP (arm) or+EL2 (arm64), allowing it to install a set of stubs before dropping to+SVC/EL1. These stubs are accessible by using a 'hvc #0' instruction,+and only act on individual CPUs.++Unless specified otherwise, any built-in hypervisor must implement+these functions (see arch/arm{,64}/include/asm/virt.h):++* r0/x0 = HVC_GET_VECTORS++ Return the current value of HVBAR/VBAR_EL2 in r0/x0.++* r0/x0 = HVC_SET_VECTORS+ r1/x1 = vectors++ Set HVBAR/VBAR_EL2 to 'vectors' to enable a hypervisor. Only+ implemented by the initial stubs.++* r0/x0 = HVC_RESET_VECTORS++ Turn HYP/EL2 MMU off, and reset HVBAR/VBAR_EL2 to the default+ value. This effectively disables an existing hypervisor.++* r0/x0 = HVC_SOFT_RESTART+ r1/x1 = restart address+ x2 = x0's value when entering the next payload (arm64)+ x3 = x1's value when entering the next payload (arm64)+ x4 = x2's value when entering the next payload (arm64)++ Mask all exceptions, disable the MMU, move the arguments into place+ (arm64 only), and jump to the restart address while at HYP/EL2. This+ hypercall is not expected to return to its caller.++Any other value of r0/x0 triggers a hypervisor-specific handling,+which is not documented here.