]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: arm64: Treat vCPU with pending SError as runnable
authorOliver Upton <oliver.upton@linux.dev>
Tue, 8 Jul 2025 17:25:09 +0000 (10:25 -0700)
committerOliver Upton <oliver.upton@linux.dev>
Tue, 8 Jul 2025 17:40:30 +0000 (10:40 -0700)
Per R_VRLPB, a pending SError is a WFI wakeup event regardless of
PSTATE.A, meaning that the vCPU is runnable. Sample VSE in addition to
the other IRQ lines.

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

index 659446378fca19f0eb2b4ed5f1663a65e8f616d6..bbe7b98e1ce3bf96a0e2673756ff52d9f5961892 100644 (file)
@@ -740,7 +740,8 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
  */
 int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)
 {
-       bool irq_lines = *vcpu_hcr(v) & (HCR_VI | HCR_VF);
+       bool irq_lines = *vcpu_hcr(v) & (HCR_VI | HCR_VF | HCR_VSE);
+
        return ((irq_lines || kvm_vgic_vcpu_pending_irq(v))
                && !kvm_arm_vcpu_stopped(v) && !v->arch.pause);
 }