Skip to contentSkip to conversation

KVM: PIT: take inject_pending into account when emulating hlt

PATCH Applied Marcelo Tosatti 2 participants 2 messages May 6, 2008 – May 7, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Otherwise hlt emulation fails if PIT is not injecting IRQ's.

arch/x86/kvm/i8254.c +1 -1
index 1646102..07f9ff1 100644
@@ -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;

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Applied
#1 lore raw
Quoted 2 lines · Marcelo Tosatti

Otherwise hlt emulation fails if PIT is not injecting IRQ's.

Applied, thanks.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone