diff options
author | Sheng Yang <sheng.yang@intel.com> | 2008-01-27 16:10:22 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 05:00:21 -0400 |
commit | 7837699fa6d7adf81f26ab73a5f6897ea1ab9d6a (patch) | |
tree | 37a89d5c10869a9ada59df75b49d685708661434 /arch/x86/kvm/irq.c | |
parent | 4fcaa98267efc4d39ded9b0bc33c6b4a2f62fecd (diff) |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c index e5714759e97f..dbfe21c99c48 100644 --- a/arch/x86/kvm/irq.c +++ b/arch/x86/kvm/irq.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kvm_host.h> | 23 | #include <linux/kvm_host.h> |
24 | 24 | ||
25 | #include "irq.h" | 25 | #include "irq.h" |
26 | #include "i8254.h" | ||
26 | 27 | ||
27 | /* | 28 | /* |
28 | * check if there is pending interrupt without | 29 | * check if there is pending interrupt without |
@@ -66,6 +67,7 @@ EXPORT_SYMBOL_GPL(kvm_cpu_get_interrupt); | |||
66 | void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu) | 67 | void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu) |
67 | { | 68 | { |
68 | kvm_inject_apic_timer_irqs(vcpu); | 69 | kvm_inject_apic_timer_irqs(vcpu); |
70 | kvm_inject_pit_timer_irqs(vcpu); | ||
69 | /* TODO: PIT, RTC etc. */ | 71 | /* TODO: PIT, RTC etc. */ |
70 | } | 72 | } |
71 | EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs); | 73 | EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs); |
@@ -73,6 +75,7 @@ EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs); | |||
73 | void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec) | 75 | void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec) |
74 | { | 76 | { |
75 | kvm_apic_timer_intr_post(vcpu, vec); | 77 | kvm_apic_timer_intr_post(vcpu, vec); |
78 | kvm_pit_timer_intr_post(vcpu, vec); | ||
76 | /* TODO: PIT, RTC etc. */ | 79 | /* TODO: PIT, RTC etc. */ |
77 | } | 80 | } |
78 | EXPORT_SYMBOL_GPL(kvm_timer_intr_post); | 81 | EXPORT_SYMBOL_GPL(kvm_timer_intr_post); |