diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-05-06 16:32:54 (GMT) |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-05-18 11:34:15 (GMT) |
commit | eedaa4e2af681a266c084c410238855bdfbc2787 (patch) | |
tree | f9cb896f19b8b67ad01159bfd48cb1744ba4dd28 | |
parent | 5ca9fd54e3d75489ff9c70d7af6e0b9a390dd656 (diff) | |
download | linux-fsl-qoriq-eedaa4e2af681a266c084c410238855bdfbc2787.tar.xz |
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 3324d90..7c077a9 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; |