Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 545

kvm-83-270.el5_11.src.rpm

From 4999693594fdc64496da5cf19c44831aa3534759 Mon Sep 17 00:00:00 2001
From: Gleb Natapov <gleb@redhat.com>
Date: Sun, 7 Mar 2010 13:26:40 -0300
Subject: [PATCH 1/3] account only for IRQ injected into vcpu0

RH-Author: Gleb Natapov <gleb@redhat.com>
Message-id: <20100307132640.GX16909@redhat.com>
Patchwork-id: 7584
O-Subject: [PATCH RHEL5.5/5.6] account only for IRQ injected into vcpu0
Bugzilla: 555727
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Zachary Amsden <zamsden@redhat.com>
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>

Some Windowses configure RTC interrupt to be broadcasted, but they still
do time keeping only on boot CPU. This breaks rtc-td-hack option
since now it can't tell if interrupt was accounted for for time keeping
purposes or it should be reinject. Since rtc-td-hack is the only user
for set_irq return value fix this by doing irq coalescing checking
only on vcpu0.

BZ: 555727
Upstream status: We will have to do something less hacky there.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
			Gleb.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 arch/x86/kvm/lapic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 4bd1aa3..ade469c 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -207,7 +207,7 @@ int kvm_apic_set_irq(struct kvm_vcpu *vcpu, u8 vec, u8 trig)
 		else
 			apic_clear_vector(vec, apic->regs + APIC_TMR);
 		kvm_vcpu_kick(apic->vcpu);
-		return 1;
+		return kvm_apic_id(apic) == 0;
 	}
 	return 0;
 }
-- 
1.7.0.3