]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: KVM: Improve ISA extension by using a bitmap
authorAtish Patra <atishp@rivosinc.com>
Fri, 29 Jul 2022 11:44:11 +0000 (17:14 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 29 Jul 2022 11:44:11 +0000 (17:14 +0530)
commit93f5f74ccdc73cb741682c3a80a42cd262dfa3b7
treed0a5e62e041debf2f084b9e64f4347050c7f654e
parent0a4b4ae17c65fda634898caa9038ed14910ba2e2
RISC-V: KVM: Improve ISA extension by using a bitmap

Currently, the every vcpu only stores the ISA extensions in a unsigned long
which is not scalable as number of extensions will continue to grow.
Using a bitmap allows the ISA extension to support any number of
extensions. The CONFIG one reg interface implementation is modified to
support the bitmap as well. But it is meant only for base extensions.
Thus, the first element of the bitmap array is sufficient for that
interface.

In the future, all the new multi-letter extensions must use the
ISA_EXT one reg interface that allows enabling/disabling any extension
now.

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/kvm_host.h
arch/riscv/include/asm/kvm_vcpu_fp.h
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vcpu_fp.c