]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2568eddd80a4b9961e45b7d2c1cf9b2806dd5393
tree680b1b3dcd93f8db37807794cc644b86f6610e37
parent92513b22815feb25c509b84e1e391014ea66d684
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: 53dc2d2fb799 ("RISC-V: KVM: Implement
KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls")
arch/riscv/kvm/vcpu.c