summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/irq.c
diff options
context:
space:
mode:
authorSheng Yang <sheng.yang@intel.com>2008-01-28 05:10:22 +0800
committerAvi Kivity <avi@qumranet.com>2008-04-27 12:00:21 +0300
commit7837699fa6d7adf81f26ab73a5f6897ea1ab9d6a (patch)
tree37a89d5c10869a9ada59df75b49d685708661434 /arch/x86/kvm/irq.c
parent4fcaa98267efc4d39ded9b0bc33c6b4a2f62fecd (diff)
downloadop-kernel-dev-7837699fa6d7adf81f26ab73a5f6897ea1ab9d6a.zip
op-kernel-dev-7837699fa6d7adf81f26ab73a5f6897ea1ab9d6a.tar.gz
KVM: In kernel PIT model
The patch moves the PIT model from userspace to kernel, and increases the timer accuracy greatly. [marcelo: make last_injected_time per-guest] Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Tested-and-Acked-by: Alex Davis <alex14641@yahoo.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/irq.c')
-rw-r--r--arch/x86/kvm/irq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c
index e571475..dbfe21c 100644
--- a/arch/x86/kvm/irq.c
+++ b/arch/x86/kvm/irq.c
@@ -23,6 +23,7 @@
#include <linux/kvm_host.h>
#include "irq.h"
+#include "i8254.h"
/*
* check if there is pending interrupt without
@@ -66,6 +67,7 @@ EXPORT_SYMBOL_GPL(kvm_cpu_get_interrupt);
void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu)
{
kvm_inject_apic_timer_irqs(vcpu);
+ kvm_inject_pit_timer_irqs(vcpu);
/* TODO: PIT, RTC etc. */
}
EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs);
@@ -73,6 +75,7 @@ EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs);
void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec)
{
kvm_apic_timer_intr_post(vcpu, vec);
+ kvm_pit_timer_intr_post(vcpu, vec);
/* TODO: PIT, RTC etc. */
}
EXPORT_SYMBOL_GPL(kvm_timer_intr_post);
OpenPOWER on IntegriCloud