RISC-V: KVM: Restrict the extensions that can be disabled
authorAtish Patra <atishp@rivosinc.com>
Wed, 20 Apr 2022 01:32:58 +0000 (18:32 -0700)
committerAnup Patel <anup@brainfault.org>
Wed, 20 Apr 2022 08:54:32 +0000 (14:24 +0530)
commit38d9a4ac65f204f264b33b966f0af4366f5518a8
tree680b1b3dcd93f8db37807794cc644b86f6610e37
parent3ab75a793e4939519d288ef1994db73b8e2d1d86
RISC-V: KVM: Restrict the extensions that can be disabled

Currently, the config isa register allows us to disable all allowed
single letter ISA extensions. It shouldn't be the case as vmm shouldn't
be able to disable base extensions (imac).

These extensions should always be enabled as long as they are enabled
in the host ISA.

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Fixes: 92ad82002c39 ("RISC-V: KVM: Implement
KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls")
arch/riscv/kvm/vcpu.c