summaryrefslogtreecommitdiff
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2008-05-06 13:32:54 -0300
committerAvi Kivity <avi@qumranet.com>2008-05-18 14:34:15 +0300
commiteedaa4e2af681a266c084c410238855bdfbc2787 (patch)
treef9cb896f19b8b67ad01159bfd48cb1744ba4dd28 /arch/x86/kvm
parent5ca9fd54e3d75489ff9c70d7af6e0b9a390dd656 (diff)
downloadlinux-3.10-eedaa4e2af681a266c084c410238855bdfbc2787.tar.gz
linux-3.10-eedaa4e2af681a266c084c410238855bdfbc2787.tar.bz2
linux-3.10-eedaa4e2af681a266c084c410238855bdfbc2787.zip
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>
Diffstat (limited to 'arch/x86/kvm')
-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 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;