[PATCH v3 4/9] KVM: arm64: Discard a pending SError when resetting a vcpu

Steffen Eiden seiden at linux.ibm.com
Mon Nov 30 05:38:00 PST 2026


On Mon, Nov 30, 2026 at 11:48:16AM +0300, Dan Carpenter wrote:
> Resetting a vcpu with the KVM_ARM_VCPU_INIT ioctl keeps a pending
> SError.  We used to rely on vcpu_reset_hcr() to clear the SError but
> commit f1ff3fc5209a ("KVM: arm64: unify code to prepare traps") changed
> it to only reset HCR_EL2 before the vcpu's very first KVM_RUN.
> 
> If we reboot a guest while there is a pending SError then KVM delivers
> it to the freshly booted guest.
> 
> Clear HCR_EL2.VSE in kvm_reset_vcpu().
> 
> Fixes: f1ff3fc5209a ("KVM: arm64: unify code to prepare traps")
> Cc: stable at vger.kernel.org
> Signed-off-by: Dan Carpenter <dan at pereq.eu>

Reviewed-by: Steffen Eiden <seiden at linux.ibm.com>




More information about the linux-arm-kernel mailing list