Skip to content
Unverified Commit 869c7060 authored by Sean Christopherson's avatar Sean Christopherson Committed by Palmer Dabbelt
Browse files

RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n



Use what is currently the SMP=y version of riscv_cpuid_to_hartid_mask()
for both SMP=y and SMP=n to fix a build failure with KVM=m and SMP=n due
to boot_cpu_hartid not being exported.  This also fixes a second bug
where the SMP=n version assumes the sole CPU in the system is in the
incoming mask, which may not hold true in kvm_riscv_vcpu_sbi_ecall() if
the KVM guest VM has multiple vCPUs (on a SMP=n system).

Fixes: 1ef46c23 ("RISC-V: Implement new SBI v0.2 extensions")
Reported-by: default avatarAdam Borowski <kilobyte@angband.pl>
Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 51f23e53
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment