Skip to contentSkip to conversation

KVM: LAPIC: ignore pending timers if LVTT is disabled

PATCH Applied Marcelo Tosatti 2 participants 2 messages May 14, 2008

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

Only use the APIC pending timers count to break out of HLT emulation if the timer vector is enabled.

Certain configurations of Windows simply mask out the vector without disabling the timer.

arch/x86/kvm/lapic.c +1 -1
index 7652f88..d41e34c 100644
@@ -961,7 +961,7 @@ int apic_has_pending_timer(struct kvm_vcpu *vcpu)
 {
 	struct kvm_lapic *lapic = vcpu->arch.apic;
 
-	if (lapic)
+	if (lapic && apic_enabled(lapic) && apic_lvt_enabled(lapic, APIC_LVTT))
 		return atomic_read(&lapic->timer.pending);
 
 	return 0;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Applied
#1 lore raw
Quoted 7 lines · Marcelo Tosatti

Only use the APIC pending timers count to break out of HLT emulation if the timer vector is enabled.

Certain configurations of Windows simply mask out the vector without disabling the timer.

Applied, thanks.

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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/