summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorAvi Kivity2008-01-16 11:49:30 +0100
committerAvi Kivity2008-01-30 17:01:22 +0100
commit2f52d58c92d971bf421f461ad06eb93fb4f34981 (patch)
tree59e4bf7960686689606be7136f28ebfe32e7fb2d /arch/x86/kvm/x86.c
parentKVM: Put kvm_para.h include outside __KERNEL__ (diff)
downloadkernel-qcow2-linux-2f52d58c92d971bf421f461ad06eb93fb4f34981.tar.gz
kernel-qcow2-linux-2f52d58c92d971bf421f461ad06eb93fb4f34981.tar.xz
kernel-qcow2-linux-2f52d58c92d971bf421f461ad06eb93fb4f34981.zip
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:
if (unlikely(r))
goto out;
- if (vcpu->requests)
+ if (vcpu->requests) {
+ if (test_and_clear_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests))
+ __kvm_migrate_apic_timer(vcpu);
if (test_and_clear_bit(KVM_REQ_REPORT_TPR_ACCESS,
&vcpu->requests)) {
kvm_run->exit_reason = KVM_EXIT_TPR_ACCESS;
r = 0;
goto out;
}
+ }
kvm_inject_pending_timer_irqs(vcpu);