aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-05-10 05:34:53 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:47:05 -0400
commita8eeb04a44dd6dc4c8158953d9bae48849c9a188 (patch)
tree70274957d251afb17c8aaf660363795b44bf993f /virt
parent36633f32ba4c238403d19584754b30fe469d6dcb (diff)
KVM: Add mini-API for vcpu->requests
Makes it a little more readable and hackable. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 65417e3d8462..5bd2f34ba576 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -145,7 +145,7 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
145 raw_spin_lock(&kvm->requests_lock); 145 raw_spin_lock(&kvm->requests_lock);
146 me = smp_processor_id(); 146 me = smp_processor_id();
147 kvm_for_each_vcpu(i, vcpu, kvm) { 147 kvm_for_each_vcpu(i, vcpu, kvm) {
148 if (test_and_set_bit(req, &vcpu->requests)) 148 if (kvm_make_check_request(req, vcpu))
149 continue; 149 continue;
150 cpu = vcpu->cpu; 150 cpu = vcpu->cpu;
151 if (cpus != NULL && cpu != -1 && cpu != me) 151 if (cpus != NULL && cpu != -1 && cpu != me)
@@ -1212,7 +1212,7 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
1212 prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE); 1212 prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE);
1213 1213
1214 if (kvm_arch_vcpu_runnable(vcpu)) { 1214 if (kvm_arch_vcpu_runnable(vcpu)) {
1215 set_bit(KVM_REQ_UNHALT, &vcpu->requests); 1215 kvm_make_request(KVM_REQ_UNHALT, vcpu);
1216 break; 1216 break;
1217 } 1217 }
1218 if (kvm_cpu_has_pending_timer(vcpu)) 1218 if (kvm_cpu_has_pending_timer(vcpu))