diff options
author | Marc Zyngier <maz@kernel.org> | 2021-10-13 15:03:42 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-10-18 18:57:09 +0300 |
commit | 271b7286058da636ab6f5f47722e098ca3a0478b (patch) | |
tree | befc3b6e1ec3886d86ea7348c550000a685f4d4a /arch | |
parent | cbca19738472be8156d854663ed724b01255c932 (diff) | |
download | linux-271b7286058da636ab6f5f47722e098ca3a0478b.tar.xz |
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 <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-8-maz@kernel.org
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/kvm/hyp/nvhe/switch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/switch.c b/arch/arm64/kvm/hyp/nvhe/switch.c index f25b6353a598..481c365ef144 100644 --- a/arch/arm64/kvm/hyp/nvhe/switch.c +++ b/arch/arm64/kvm/hyp/nvhe/switch.c @@ -256,7 +256,8 @@ static bool handle_aarch32_guest(struct kvm_vcpu *vcpu, u64 *exit_code) * protected VMs. */ vcpu->arch.target = -1; - *exit_code = ARM_EXCEPTION_IL; + *exit_code &= BIT(ARM_EXIT_WITH_SERROR_BIT); + *exit_code |= ARM_EXCEPTION_IL; return false; } |