Skip to content

Commit 6e3b773

Browse files
ptosioupton
authored andcommitted
KVM: arm64: nVHE: Simplify invalid_host_el2_vect
The invalid_host_el2_vect macro is used by EL2{t,h} handlers in nVHE *host* context, which should never run with a guest context loaded. Therefore, remove the superfluous vCPU context check and branch unconditionally to hyp_panic. Signed-off-by: Pierre-Clément Tosi <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent ea9d7c8 commit 6e3b773

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

arch/arm64/kvm/hyp/nvhe/host.S

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,6 @@ SYM_FUNC_END(__host_hvc)
197197
sub x0, sp, x0 // x0'' = sp' - x0' = (sp + x0) - sp = x0
198198
sub sp, sp, x0 // sp'' = sp' - x0 = (sp + x0) - x0 = sp
199199

200-
/* If a guest is loaded, panic out of it. */
201-
stp x0, x1, [sp, #-16]!
202-
get_loaded_vcpu x0, x1
203-
cbnz x0, __guest_exit_panic
204-
add sp, sp, #16
205-
206200
/*
207201
* The panic may not be clean if the exception is taken before the host
208202
* context has been saved by __host_exit or after the hyp context has

0 commit comments

Comments
 (0)