aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-01-16 05:49:30 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 11:01:22 -0500
commit2f52d58c92d971bf421f461ad06eb93fb4f34981 (patch)
tree59e4bf7960686689606be7136f28ebfe32e7fb2d /arch/x86/kvm/x86.c
parenta03d7f4b544f699bbdd3cf14692bd8f476cb9d24 (diff)
KVM: Move apic timer migration away from critical section
Migrating the apic timer in the critical section is not very nice, and is absolutely horrible with the real-time port. Move migration to the regular vcpu execution path, triggered by a new bitflag. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f0493e7dcf0c..8f94a0b89dff 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2518,13 +2518,16 @@ again:
2518 if (unlikely(r)) 2518 if (unlikely(r))
2519 goto out; 2519 goto out;
2520 2520
2521 if (vcpu->requests) 2521 if (vcpu->requests) {
2522 if (test_and_clear_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests))
2523 __kvm_migrate_apic_timer(vcpu);
2522 if (test_and_clear_bit(KVM_REQ_REPORT_TPR_ACCESS, 2524 if (test_and_clear_bit(KVM_REQ_REPORT_TPR_ACCESS,
2523 &vcpu->requests)) { 2525 &vcpu->requests)) {
2524 kvm_run->exit_reason = KVM_EXIT_TPR_ACCESS; 2526 kvm_run->exit_reason = KVM_EXIT_TPR_ACCESS;
2525 r = 0; 2527 r = 0;
2526 goto out; 2528 goto out;
2527 } 2529 }
2530 }
2528 2531
2529 kvm_inject_pending_timer_irqs(vcpu); 2532 kvm_inject_pending_timer_irqs(vcpu);
2530 2533