diff options
author | Marc Zyngier <maz@kernel.org> | 2022-01-27 15:49:21 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-01-27 15:49:21 +0000 |
commit | 5b578f088ada3c4319f7274c0221b5d92143fe6a (patch) | |
tree | cc018020f029687e0985f8aa7c6a8031f8a21ef5 | |
parent | a96d03eac0da77411a5246a339d87200062c07f5 (diff) | |
download | kvmtool-arm64/nv-5.16.tar.gz |
Do not enable SVE with NVarm64/nv-5.16
Signed-off-by: Marc Zyngier <maz@kernel.org>
-rw-r--r-- | arm/aarch64/kvm-cpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arm/aarch64/kvm-cpu.c b/arm/aarch64/kvm-cpu.c index da3ce23e..306774fb 100644 --- a/arm/aarch64/kvm-cpu.c +++ b/arm/aarch64/kvm-cpu.c @@ -142,13 +142,15 @@ void kvm_cpu__select_features(struct kvm *kvm, struct kvm_vcpu_init *init) } /* Enable SVE if available */ - if (kvm__supports_extension(kvm, KVM_CAP_ARM_SVE)) + if (!kvm->cfg.arch.nested_virt && + kvm__supports_extension(kvm, KVM_CAP_ARM_SVE)) init->features[0] |= 1UL << KVM_ARM_VCPU_SVE; } int kvm_cpu__configure_features(struct kvm_cpu *vcpu) { - if (kvm__supports_extension(vcpu->kvm, KVM_CAP_ARM_SVE)) { + if (!vcpu->kvm->cfg.arch.nested_virt && + kvm__supports_extension(vcpu->kvm, KVM_CAP_ARM_SVE)) { int feature = KVM_ARM_VCPU_SVE; if (ioctl(vcpu->vcpu_fd, KVM_ARM_VCPU_FINALIZE, &feature)) { |