diff options
author | Anup Patel <apatel@ventanamicro.com> | 2023-06-12 16:40:44 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-06-20 10:48:36 +0530 |
commit | d75b336225789fb967442feb6cdf9cfc0357b252 (patch) | |
tree | 5acff1145bcbe05330474bbd090d554634b29667 /arch/riscv/kvm/vcpu.c | |
parent | 377f71f6d68d13cf2f5c6c9011ce762224a57b82 (diff) | |
download | lwn-d75b336225789fb967442feb6cdf9cfc0357b252.tar.gz lwn-d75b336225789fb967442feb6cdf9cfc0357b252.zip |
RISC-V: KVM: Allow Svnapot extension for Guest/VM
We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Svnapot extension for Guest/VM.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/kvm/vcpu.c')
-rw-r--r-- | arch/riscv/kvm/vcpu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c index 2db62c6c0d3e..7b355900f235 100644 --- a/arch/riscv/kvm/vcpu.c +++ b/arch/riscv/kvm/vcpu.c @@ -61,6 +61,7 @@ static const unsigned long kvm_isa_ext_arr[] = { KVM_ISA_EXT_ARR(SSAIA), KVM_ISA_EXT_ARR(SSTC), KVM_ISA_EXT_ARR(SVINVAL), + KVM_ISA_EXT_ARR(SVNAPOT), KVM_ISA_EXT_ARR(SVPBMT), KVM_ISA_EXT_ARR(ZBB), KVM_ISA_EXT_ARR(ZIHINTPAUSE), @@ -102,6 +103,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext) case KVM_RISCV_ISA_EXT_SSAIA: case KVM_RISCV_ISA_EXT_SSTC: case KVM_RISCV_ISA_EXT_SVINVAL: + case KVM_RISCV_ISA_EXT_SVNAPOT: case KVM_RISCV_ISA_EXT_ZIHINTPAUSE: case KVM_RISCV_ISA_EXT_ZBB: return false; |