]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RISC-V: KVM: Fix check for local interrupts on riscv32
authorSamuel Holland <samuel.holland@sifive.com>
Thu, 16 Oct 2025 00:17:09 +0000 (17:17 -0700)
committerAnup Patel <anup@brainfault.org>
Thu, 16 Oct 2025 11:47:29 +0000 (17:17 +0530)
To set all 64 bits in the mask on a 32-bit system, the constant must
have type `unsigned long long`.

Fixes: 6b1e8ba4bac4 ("RISC-V: KVM: Use bitmap for irqs_pending and irqs_pending_mask")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20251016001714.3889380-1-samuel.holland@sifive.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu.c

index bccb919ca6153f82c8bd4ebca5f0ca519fd2fa6c..5ce35aba60696cf5a1d736b31e08cf7da77e7792 100644 (file)
@@ -212,7 +212,7 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
 
 int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
 {
-       return (kvm_riscv_vcpu_has_interrupts(vcpu, -1UL) &&
+       return (kvm_riscv_vcpu_has_interrupts(vcpu, -1ULL) &&
                !kvm_riscv_vcpu_stopped(vcpu) && !vcpu->arch.pause);
 }