Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > aadbe78a25743146bb784eee19f007c5 > files > 424

kvm-83-164.el5_5.9.src.rpm

From 1294d9518969f8bce635f5216eda9032e7195dfd 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/2] account only for IRQ injected into vcpu0

RH-Author: Gleb Natapov <gleb@redhat.com>
Message-id: <patch-7584-clone-for-rhel55-rhel55>
Patchwork-id: 8385
O-Subject: [PATCH RHEL5.5/5.6] account only for IRQ injected into vcpu0
Bugzilla: 577266
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