Skip to content

Commit 41182cc

Browse files
committed
RISC-V: KVM: Allow Zfa extension for Guest/VM
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zfa extension for Guest/VM. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent 1216fdd commit 41182cc

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/riscv/include/uapi/asm/kvm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ enum KVM_RISCV_ISA_EXT_ID {
165165
KVM_RISCV_ISA_EXT_ZIHINTNTL,
166166
KVM_RISCV_ISA_EXT_ZVFH,
167167
KVM_RISCV_ISA_EXT_ZVFHMIN,
168+
KVM_RISCV_ISA_EXT_ZFA,
168169
KVM_RISCV_ISA_EXT_MAX,
169170
};
170171

arch/riscv/kvm/vcpu_onereg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static const unsigned long kvm_isa_ext_arr[] = {
4747
KVM_ISA_EXT_ARR(ZBKC),
4848
KVM_ISA_EXT_ARR(ZBKX),
4949
KVM_ISA_EXT_ARR(ZBS),
50+
KVM_ISA_EXT_ARR(ZFA),
5051
KVM_ISA_EXT_ARR(ZFH),
5152
KVM_ISA_EXT_ARR(ZFHMIN),
5253
KVM_ISA_EXT_ARR(ZICBOM),
@@ -123,6 +124,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext)
123124
case KVM_RISCV_ISA_EXT_ZBKC:
124125
case KVM_RISCV_ISA_EXT_ZBKX:
125126
case KVM_RISCV_ISA_EXT_ZBS:
127+
case KVM_RISCV_ISA_EXT_ZFA:
126128
case KVM_RISCV_ISA_EXT_ZFH:
127129
case KVM_RISCV_ISA_EXT_ZFHMIN:
128130
case KVM_RISCV_ISA_EXT_ZICNTR:

0 commit comments

Comments
 (0)