KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_get_sregs

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

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:28 +01:00
committed by Paolo Bonzini
parent 875656fe0c
commit bcdec41cef
5 changed files with 22 additions and 4 deletions

View File

@@ -2612,9 +2612,7 @@ out_free1:
r = -ENOMEM;
if (!kvm_sregs)
goto out;
vcpu_load(vcpu);
r = kvm_arch_vcpu_ioctl_get_sregs(vcpu, kvm_sregs);
vcpu_put(vcpu);
if (r)
goto out;
r = -EFAULT;