* [PATCH] RISC-V: KVM: Fix check for local interrupts on riscv32
@ 2025-10-16 0:17 Samuel Holland
2025-10-16 9:42 ` Andrew Jones
2025-10-17 3:23 ` Anup Patel
0 siblings, 2 replies; 3+ messages in thread
From: Samuel Holland @ 2025-10-16 0:17 UTC (permalink / raw)
To: Anup Patel, Atish Patra
Cc: Samuel Holland, Albert Ou, Alexandre Ghiti, Andrew Jones,
Palmer Dabbelt, Paul Walmsley, kvm-riscv, kvm, linux-kernel,
linux-riscv
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>
---
arch/riscv/kvm/vcpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c
index bccb919ca615..5ce35aba6069 100644
--- a/arch/riscv/kvm/vcpu.c
+++ b/arch/riscv/kvm/vcpu.c
@@ -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);
}
--
2.47.2
base-commit: 5a6f65d1502551f84c158789e5d89299c78907c7
branch: up/kvm-aia-fix
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] RISC-V: KVM: Fix check for local interrupts on riscv32
2025-10-16 0:17 [PATCH] RISC-V: KVM: Fix check for local interrupts on riscv32 Samuel Holland
@ 2025-10-16 9:42 ` Andrew Jones
2025-10-17 3:23 ` Anup Patel
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Jones @ 2025-10-16 9:42 UTC (permalink / raw)
To: Samuel Holland
Cc: Anup Patel, Atish Patra, Albert Ou, Alexandre Ghiti,
Palmer Dabbelt, Paul Walmsley, kvm-riscv, kvm, linux-kernel,
linux-riscv
On Wed, Oct 15, 2025 at 05:17:09PM -0700, Samuel Holland wrote:
> 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>
> ---
>
> arch/riscv/kvm/vcpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c
> index bccb919ca615..5ce35aba6069 100644
> --- a/arch/riscv/kvm/vcpu.c
> +++ b/arch/riscv/kvm/vcpu.c
> @@ -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);
> }
>
> --
> 2.47.2
>
> base-commit: 5a6f65d1502551f84c158789e5d89299c78907c7
> branch: up/kvm-aia-fix
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RISC-V: KVM: Fix check for local interrupts on riscv32
2025-10-16 0:17 [PATCH] RISC-V: KVM: Fix check for local interrupts on riscv32 Samuel Holland
2025-10-16 9:42 ` Andrew Jones
@ 2025-10-17 3:23 ` Anup Patel
1 sibling, 0 replies; 3+ messages in thread
From: Anup Patel @ 2025-10-17 3:23 UTC (permalink / raw)
To: Samuel Holland
Cc: Anup Patel, Atish Patra, Albert Ou, Alexandre Ghiti, Andrew Jones,
Palmer Dabbelt, Paul Walmsley, kvm-riscv, kvm, linux-kernel,
linux-riscv
On Thu, Oct 16, 2025 at 5:47 AM Samuel Holland
<samuel.holland@sifive.com> wrote:
>
> 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>
Queued this patch for Linux-6.18 fixes.
Thanks,
Anup
> ---
>
> arch/riscv/kvm/vcpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c
> index bccb919ca615..5ce35aba6069 100644
> --- a/arch/riscv/kvm/vcpu.c
> +++ b/arch/riscv/kvm/vcpu.c
> @@ -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);
> }
>
> --
> 2.47.2
>
> base-commit: 5a6f65d1502551f84c158789e5d89299c78907c7
> branch: up/kvm-aia-fix
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-17 3:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 0:17 [PATCH] RISC-V: KVM: Fix check for local interrupts on riscv32 Samuel Holland
2025-10-16 9:42 ` Andrew Jones
2025-10-17 3:23 ` Anup Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox