KVM: arm64: nv: Remove dead code from ERET handling
authorMarc Zyngier <maz@kernel.org>
Wed, 14 May 2025 10:34:58 +0000 (11:34 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 19 May 2025 07:01:19 +0000 (08:01 +0100)
Cleanly, this code cannot trigger, since we filter this from the
caller. Drop it.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250514103501.2225951-16-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/emulate-nested.c

index 0fcfcc0..5e9fec2 100644 (file)
@@ -2471,13 +2471,6 @@ void kvm_emulate_nested_eret(struct kvm_vcpu *vcpu)
 {
        u64 spsr, elr, esr;
 
-       /*
-        * Forward this trap to the virtual EL2 if the virtual
-        * HCR_EL2.NV bit is set and this is coming from !EL2.
-        */
-       if (forward_hcr_traps(vcpu, HCR_NV))
-               return;
-
        spsr = vcpu_read_sys_reg(vcpu, SPSR_EL2);
        spsr = kvm_check_illegal_exception_return(vcpu, spsr);