KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_translate
Move vcpu_load() and vcpu_put() into the architecture specific implementations of kvm_arch_vcpu_ioctl_translate(). Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
e83dff5edf
commit
1da5b61dac
@@ -2658,9 +2658,7 @@ out_free1:
|
||||
r = -EFAULT;
|
||||
if (copy_from_user(&tr, argp, sizeof(tr)))
|
||||
goto out;
|
||||
vcpu_load(vcpu);
|
||||
r = kvm_arch_vcpu_ioctl_translate(vcpu, &tr);
|
||||
vcpu_put(vcpu);
|
||||
if (r)
|
||||
goto out;
|
||||
r = -EFAULT;
|
||||
|
Reference in New Issue
Block a user