]> 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)
commit264206c91f5d2ba0a2af6b3d97d20bf025479b00
tree680b1b3dcd93f8db37807794cc644b86f6610e37
parent788018c71ed935b206ee13778f936feef777ff94
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: bdac67aac636 ("RISC-V: KVM: Implement
KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls")
arch/riscv/kvm/vcpu.c