aboutsummaryrefslogtreecommitdiff
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2017-12-04 21:35:36 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-12-14 09:26:58 +0100
commit9b062471e52a1692c5563ba1535c84d708e2ff6f (patch)
tree93e7b9481a4f1b09c7e1cf535c65463cffd144d4 /virt/kvm/kvm_main.c
parent6a96bc7fa0cdd96bac2b8298d708a94f8de6f6d4 (diff)
downloadlinux-9b062471e52a1692c5563ba1535c84d708e2ff6f.tar.gz
KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl
Move the calls to vcpu_load() and vcpu_put() in to the architecture specific implementations of kvm_arch_vcpu_ioctl() which dispatches further architecture-specific ioctls on to other functions. Some architectures support asynchronous vcpu ioctls which cannot call vcpu_load() or take the vcpu->mutex, because that would prevent concurrent execution with a running VCPU, which is the intended purpose of these ioctls, for example because they inject interrupts. We repeat the separate checks for these specifics in the architecture code for MIPS, S390 and PPC, and avoid taking the vcpu->mutex and calling vcpu_load for these ioctls. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index ca0ec9fb72ce..19c184fa1839 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2724,9 +2724,7 @@ out_free1:
break;
}
default:
- vcpu_load(vcpu);
r = kvm_arch_vcpu_ioctl(filp, ioctl, arg);
- vcpu_put(vcpu);
}
out:
mutex_unlock(&vcpu->mutex);