Commit e20f0f44 authored by Anup Patel's avatar Anup Patel Committed by Greg Kroah-Hartman
Browse files

RISC-V: KVM: Fix the size parameter check in SBI SFENCE calls



[ Upstream commit 6aba0cb5 ]

As-per the SBI specification, an SBI remote fence operation applies
to the entire address space if either:
1) start_addr and size are both 0
2) size is equal to 2^XLEN-1

>From the above, only #1 is checked by SBI SFENCE calls so fix the
size parameter check in SBI SFENCE calls to cover #2 as well.

Fixes: 13acfec2 ("RISC-V: KVM: Add remote HFENCE functions based on VCPU requests")
Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
Signed-off-by: default avatarAnup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/r/20250605061458.196003-2-apatel@ventanamicro.com


Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a77d0a14
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment