Skip to content

Commit c103c2d

Browse files
Fuad TabbaMarc Zyngier
authored andcommitted
KVM: arm64: Remove dead code resetting HCR_EL2 for pKVM
The pKVM lifecycle does not support tearing down the hypervisor and returning to the hyp stub once initialized. The transition to protected mode is one-way. Consequently, the code path in hyp-init.S responsible for resetting EL2 registers (triggered by kexec or hibernation) is unreachable in protected mode. Remove the dead code handling HCR_EL2 reset for ARM64_KVM_PROTECTED_MODE. No functional change intended. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://patch.msgid.link/20260122112218.531948-2-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 9ace475 commit c103c2d

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

arch/arm64/kvm/hyp/nvhe/hyp-init.S

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,6 @@ reset:
260260
msr sctlr_el2, x5
261261
isb
262262

263-
alternative_if ARM64_KVM_PROTECTED_MODE
264-
mov_q x5, HCR_HOST_NVHE_FLAGS
265-
msr_hcr_el2 x5
266-
alternative_else_nop_endif
267-
268263
/* Install stub vectors */
269264
adr_l x5, __hyp_stub_vectors
270265
msr vbar_el2, x5

0 commit comments

Comments
 (0)