summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/reset.c
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2023-09-20 22:50:34 +0300
committerOliver Upton <oliver.upton@linux.dev>2023-09-21 21:13:29 +0300
commitd99fb82fd35e816b3656141e5dd940dfd00d09fd (patch)
treef83d61792e3ede2d9020252978295ee99ee2919b /arch/arm64/kvm/reset.c
parent12405b09926f0270f7033ed5293241180ea57343 (diff)
downloadlinux-d99fb82fd35e816b3656141e5dd940dfd00d09fd.tar.xz
KVM: arm64: Hoist NV+SVE check into KVM_ARM_VCPU_INIT ioctl handler
Move the feature check out of kvm_reset_vcpu() so we can make the function succeed uncondtitionally. Link: https://lore.kernel.org/r/20230920195036.1169791-7-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/kvm/reset.c')
-rw-r--r--arch/arm64/kvm/reset.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index bbcf5bbd66d9..edffbfab5e7b 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -208,12 +208,6 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
if (loaded)
kvm_arch_vcpu_put(vcpu);
- /* Disallow NV+SVE for the time being */
- if (vcpu_has_nv(vcpu) && vcpu_has_feature(vcpu, KVM_ARM_VCPU_SVE)) {
- ret = -EINVAL;
- goto out;
- }
-
if (!kvm_arm_vcpu_sve_finalized(vcpu)) {
if (test_bit(KVM_ARM_VCPU_SVE, vcpu->arch.features))
kvm_vcpu_enable_sve(vcpu);
@@ -267,7 +261,7 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
/* Reset timer */
ret = kvm_timer_vcpu_reset(vcpu);
-out:
+
if (loaded)
kvm_arch_vcpu_load(vcpu, smp_processor_id());
preempt_enable();