From: Marcelo Tosatti Date: Tue, 6 May 2008 16:32:54 +0000 (-0300) Subject: KVM: PIT: take inject_pending into account when emulating hlt X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eedaa4e2af681a266c084c410238855bdfbc2787;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Avi Kivity --- 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;