KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run
Move vcpu_load() and vcpu_put() into the architecture specific implementations of kvm_arch_vcpu_ioctl_run(). Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> # s390 parts Reviewed-by: Cornelia Huck <cohuck@redhat.com> [Rebased. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
8a32dd60ec
commit
accb757d79
@@ -2562,7 +2562,6 @@ static long kvm_vcpu_ioctl(struct file *filp,
|
||||
r = -EINVAL;
|
||||
if (arg)
|
||||
goto out;
|
||||
vcpu_load(vcpu);
|
||||
oldpid = rcu_access_pointer(vcpu->pid);
|
||||
if (unlikely(oldpid != current->pids[PIDTYPE_PID].pid)) {
|
||||
/* The thread running this VCPU changed. */
|
||||
@@ -2574,7 +2573,6 @@ static long kvm_vcpu_ioctl(struct file *filp,
|
||||
put_pid(oldpid);
|
||||
}
|
||||
r = kvm_arch_vcpu_ioctl_run(vcpu, vcpu->run);
|
||||
vcpu_put(vcpu);
|
||||
trace_kvm_userspace_exit(vcpu->run->exit_reason, r);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user