diff options
author | Dave Martin <Dave.Martin@arm.com> | 2019-01-15 12:21:22 +0000 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2019-03-29 14:41:54 +0000 |
commit | 555f3d03e7fb43a539050aee91337978da14a25e (patch) | |
tree | 8bca304bbe04015359c33f694684c498c79f6f7f /arch/arm64/kvm/reset.c | |
parent | 9a3cdf26e3363ec5460ebe20c508114fa63bcf26 (diff) | |
download | linux-555f3d03e7fb43a539050aee91337978da14a25e.tar.gz linux-555f3d03e7fb43a539050aee91337978da14a25e.tar.bz2 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.c | 3 |
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; } |