summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/reset.c
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2019-01-15 13:21:22 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2019-03-29 15:41:54 +0100
commit555f3d03e7fb43a539050aee91337978da14a25e (patch)
tree8bca304bbe04015359c33f694684c498c79f6f7f /arch/arm64/kvm/reset.c
parentKVM: arm64/sve: Allow userspace to enable SVE for vcpus (diff)
downloadlinux-555f3d03e7fb43a539050aee91337978da14a25e.tar.xz
linux-555f3d03e7fb43a539050aee91337978da14a25e.zip
KVM: arm64: Add a capability to advertise SVE support
To provide a uniform way to check for KVM SVE support amongst other features, this patch adds a suitable capability KVM_CAP_ARM_SVE, and reports it as present when SVE is available. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Julien Thierry <julien.thierry@arm.com> Tested-by: zhang.lei <zhang.lei@jp.fujitsu.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/reset.c')
-rw-r--r--arch/arm64/kvm/reset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index 32c5ac0a3872..f13378d0a0ad 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -98,6 +98,9 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
case KVM_CAP_ARM_VM_IPA_SIZE:
r = kvm_ipa_limit;
break;
+ case KVM_CAP_ARM_SVE:
+ r = system_supports_sve();
+ break;
default:
r = 0;
}