KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_set_regs

Move vcpu_load() and vcpu_put() into the architecture specific
implementations of kvm_arch_vcpu_ioctl_set_regs().

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Christoffer Dall
2017-12-04 21:35:27 +01:00
committed by Paolo Bonzini
parent 1fc9b76b3d
commit 875656fe0c
6 changed files with 14 additions and 2 deletions

View File

@@ -2603,9 +2603,7 @@ out_free1:
r = PTR_ERR(kvm_regs);
goto out;
}
vcpu_load(vcpu);
r = kvm_arch_vcpu_ioctl_set_regs(vcpu, kvm_regs);
vcpu_put(vcpu);
kfree(kvm_regs);
break;
}