diff options
author | Vincent Chen <vincent.chen@sifive.com> | 2023-06-05 11:07:15 +0000 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2023-06-08 07:16:50 -0700 |
commit | bf78f1ea6e5108a7ebd55be0853f0716433117a9 (patch) | |
tree | aa1ee3b0d1ee30d7bf53f385ca2efe5a3fe18329 | |
parent | c7cdd96eca2810f5b69c37eb439ec63d59fa1b83 (diff) | |
download | linux-stable-bf78f1ea6e5108a7ebd55be0853f0716433117a9.tar.gz linux-stable-bf78f1ea6e5108a7ebd55be0853f0716433117a9.tar.bz2 linux-stable-bf78f1ea6e5108a7ebd55be0853f0716433117a9.zip |
riscv: kvm: Add V extension to KVM ISA
Add V extension to KVM isa extension list to enable supporting of V
extension on VCPUs.
Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Acked-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
Link: https://lore.kernel.org/r/20230605110724.21391-19-andy.chiu@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
-rw-r--r-- | arch/riscv/include/uapi/asm/kvm.h | 1 | ||||
-rw-r--r-- | arch/riscv/kvm/vcpu.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h index f92790c9481a..8feb57c4c2e8 100644 --- a/arch/riscv/include/uapi/asm/kvm.h +++ b/arch/riscv/include/uapi/asm/kvm.h @@ -121,6 +121,7 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZICBOZ, KVM_RISCV_ISA_EXT_ZBB, KVM_RISCV_ISA_EXT_SSAIA, + KVM_RISCV_ISA_EXT_V, KVM_RISCV_ISA_EXT_MAX, }; diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c index 8bd9f2a8a0b9..f3282ff371ca 100644 --- a/arch/riscv/kvm/vcpu.c +++ b/arch/riscv/kvm/vcpu.c @@ -57,6 +57,7 @@ static const unsigned long kvm_isa_ext_arr[] = { [KVM_RISCV_ISA_EXT_H] = RISCV_ISA_EXT_h, [KVM_RISCV_ISA_EXT_I] = RISCV_ISA_EXT_i, [KVM_RISCV_ISA_EXT_M] = RISCV_ISA_EXT_m, + [KVM_RISCV_ISA_EXT_V] = RISCV_ISA_EXT_v, KVM_ISA_EXT_ARR(SSAIA), KVM_ISA_EXT_ARR(SSTC), |