Skip to content

Commit 271b728

Browse files
author
Marc Zyngier
committed
KVM: arm64: pkvm: Preserve pending SError on exit from AArch32
Don't drop a potential SError when a guest gets caught red-handed running AArch32 code. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Fuad Tabba <[email protected]> Tested-by: Fuad Tabba <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cbca197 commit 271b728

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/arm64/kvm/hyp/nvhe/switch.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ static bool handle_aarch32_guest(struct kvm_vcpu *vcpu, u64 *exit_code)
256256
* protected VMs.
257257
*/
258258
vcpu->arch.target = -1;
259-
*exit_code = ARM_EXCEPTION_IL;
259+
*exit_code &= BIT(ARM_EXIT_WITH_SERROR_BIT);
260+
*exit_code |= ARM_EXCEPTION_IL;
260261
return false;
261262
}
262263

0 commit comments

Comments
 (0)