diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-05-06 13:32:54 -0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-05-18 14:34:15 +0300 |
commit | eedaa4e2af681a266c084c410238855bdfbc2787 (patch) | |
tree | f9cb896f19b8b67ad01159bfd48cb1744ba4dd28 | |
parent | 5ca9fd54e3d75489ff9c70d7af6e0b9a390dd656 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 3324d90038e..7c077a9d977 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) { struct kvm_pit *pit = vcpu->kvm->arch.vpit; - if (pit && vcpu->vcpu_id == 0) + if (pit && vcpu->vcpu_id == 0 && pit->pit_state.inject_pending) return atomic_read(&pit->pit_state.pit_timer.pending); return 0; |