Vanilla KVM stores a pending SError in ->hcr_el2 but nested KVM stores it in the NESTED_SERROR_PENDING flag. Clear the flag for nested SErrors when we reset the vcpu. Fixes: 77ee70a07357 ("KVM: arm64: nv: Honor SError exception routing / masking") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter --- v2: New patch. I split it up like this to make backporting easier. --- arch/arm64/kvm/reset.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index a5d298d5ce61..d80b38b2ce6c 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c @@ -209,6 +209,7 @@ void kvm_reset_vcpu(struct kvm_vcpu *vcpu) /* Discard a pending SError */ vcpu->arch.hcr_el2 &= ~HCR_EL2_VSE; + vcpu_clear_flag(vcpu, NESTED_SERROR_PENDING); /* * Additional reset state handling that PSCI may have imposed on us. -- 2.53.0