KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_set_guest_debug

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

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:
Christoffer Dall
2017-12-04 21:35:33 +01:00
committed by Paolo Bonzini
parent 1da5b61dac
commit 66b5656222
6 changed files with 42 additions and 16 deletions

View File

@@ -2673,9 +2673,7 @@ out_free1:
r = -EFAULT;
if (copy_from_user(&dbg, argp, sizeof(dbg)))
goto out;
vcpu_load(vcpu);
r = kvm_arch_vcpu_ioctl_set_guest_debug(vcpu, &dbg);
vcpu_put(vcpu);
break;
}
case KVM_SET_SIGNAL_MASK: {