RISC-V: KVM: use ENOENT in *_one_reg() when extension is unavailable
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Thu, 3 Aug 2023 16:32:54 +0000 (13:32 -0300)
committerAnup Patel <anup@brainfault.org>
Tue, 8 Aug 2023 11:55:44 +0000 (17:25 +0530)
commita044ef71043ebc23903f657fd51b10783d34918b
tree912a19b75581992c7f9f2206a860f3eee954612d
parent2a88f38cd58d026c0e13f4aaa495965d4e9626b9
RISC-V: KVM: use ENOENT in *_one_reg() when extension is unavailable

Following a similar logic as the previous patch let's minimize the EINVAL
usage in *_one_reg() APIs by using ENOENT when an extension that
implements the reg is not available.

For consistency we're also replacing an EOPNOTSUPP instance that should
be an ENOENT since it's an "extension is not available" error.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu_onereg.c