aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2008-05-06 12:32:54 -0400
committerAvi Kivity <avi@qumranet.com>2008-05-18 07:34:15 -0400
commiteedaa4e2af681a266c084c410238855bdfbc2787 (patch)
treef9cb896f19b8b67ad01159bfd48cb1744ba4dd28
parent5ca9fd54e3d75489ff9c70d7af6e0b9a390dd656 (diff)
KVM: PIT: take inject_pending into account when emulating hlt
Otherwise hlt emulation fails if PIT is not injecting IRQ's. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/x86/kvm/i8254.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 3324d90038e4..7c077a9d9777 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -216,7 +216,7 @@ int pit_has_pending_timer(struct kvm_vcpu *vcpu)
216{ 216{
217 struct kvm_pit *pit = vcpu->kvm->arch.vpit; 217 struct kvm_pit *pit = vcpu->kvm->arch.vpit;
218 218
219 if (pit && vcpu->vcpu_id == 0) 219 if (pit && vcpu->vcpu_id == 0 && pit->pit_state.inject_pending)
220 return atomic_read(&pit->pit_state.pit_timer.pending); 220 return atomic_read(&pit->pit_state.pit_timer.pending);
221 221
222 return 0; 222 return 0;