linux-stable/arch/riscv/kvm
Andrew Jones ccfe866220 RISC-V: Align SBI probe implementation with spec
commit 41cad8284d upstream.

sbi_probe_extension() is specified with "Returns 0 if the given SBI
extension ID (EID) is not available, or 1 if it is available unless
defined as any other non-zero value by the implementation."
Additionally, sbiret.value is a long. Fix the implementation to
ensure any nonzero long value is considered a success, rather
than only positive int values.

Fixes: b9dcd9e415 ("RISC-V: Add basic support for SBI v0.2")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230427163626.101042-1-ajones@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:03:04 +09:00
..
Kconfig RISC-V: KVM: Use generic guest entry infrastructure 2022-10-02 10:19:25 +05:30
main.c RISC-V: Align SBI probe implementation with spec 2023-05-11 23:03:04 +09:00
Makefile RISC-V: KVM: Factor-out instruction emulation into separate sources 2022-07-29 17:14:40 +05:30
mmu.c KVM: RISC-V: Retry fault if vma_lookup() results become invalid 2023-05-11 23:03:03 +09:00
tlb.c RISC-V: KVM: Use Svinval for local TLB maintenance when available 2022-10-02 10:18:37 +05:30
vcpu.c RISC-V: KVM: Fix reg_val check in kvm_riscv_vcpu_set_reg_config() 2022-12-31 13:32:51 +01:00
vcpu_exit.c riscv: KVM: Apply insn-def to hlv encodings 2022-10-02 10:18:20 +05:30
vcpu_fp.c RISC-V: KVM: Improve ISA extension by using a bitmap 2022-07-29 17:14:11 +05:30
vcpu_insn.c KVM: remove KVM_REQ_UNHALT 2022-09-26 12:37:21 -04:00
vcpu_sbi.c riscv: kvm: move extern sbi_ext declarations to a header 2022-08-19 23:22:47 +05:30
vcpu_sbi_base.c RISC-V: KVM: Fix SBI implementation version 2022-02-02 18:58:06 +05:30
vcpu_sbi_hsm.c RISC-V: KVM: Implement SBI HSM suspend call 2022-03-11 19:02:39 +05:30
vcpu_sbi_replace.c RISC-V: KVM: Add remote HFENCE functions based on VCPU requests 2022-05-20 09:09:15 +05:30
vcpu_sbi_v01.c RISC-V: KVM: Add remote HFENCE functions based on VCPU requests 2022-05-20 09:09:15 +05:30
vcpu_switch.S RISC-V: KVM: Refine __kvm_riscv_switch_to() implementation 2022-03-11 19:02:22 +05:30
vcpu_timer.c riscv/kvm: Fix VM hang in case of timer delta being zero. 2023-04-06 12:10:42 +02:00
vm.c RISC-V: KVM: Make kvm_riscv_guest_timer_init a void function 2022-07-29 17:14:26 +05:30
vmid.c RISC-V: KVM: fix typos in comments 2022-06-09 09:18:15 +05:30