summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2013-06-24 15:19:15 +0300
committerGleb Natapov <gleb@redhat.com>2013-06-27 14:20:53 +0300
commit24f7bb52e952912b6a936ebcdc4e744b03e9e5cf (patch)
tree53ebca7bbfcae0eb83f678c37f9ab02fdd52179d /virt
parent489223edf29bc08f84e581c9495a2b42c9d52f08 (diff)
downloadop-kernel-dev-24f7bb52e952912b6a936ebcdc4e744b03e9e5cf.zip
op-kernel-dev-24f7bb52e952912b6a936ebcdc4e744b03e9e5cf.tar.gz
KVM: Fix RTC interrupt coalescing tracking
This reverts most of the f1ed0450a5fac7067590317cbf027f566b6ccbca. After the commit kvm_apic_set_irq() no longer returns accurate information about interrupt injection status if injection is done into disabled APIC. RTC interrupt coalescing tracking relies on the information to be accurate and cannot recover if it is not. Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/irq_comm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index ef1817b..e2e6b44 100644
--- a/virt/kvm/irq_comm.c
+++ b/virt/kvm/irq_comm.c
@@ -91,8 +91,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
if (!kvm_is_dm_lowest_prio(irq)) {
if (r < 0)
r = 0;
- kvm_apic_set_irq(vcpu, irq, dest_map);
- r++;
+ r += kvm_apic_set_irq(vcpu, irq, dest_map);
} else if (kvm_lapic_enabled(vcpu)) {
if (!lowest)
lowest = vcpu;
@@ -101,10 +100,8 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
}
}
- if (lowest) {
- kvm_apic_set_irq(lowest, irq, dest_map);
- r = 1;
- }
+ if (lowest)
+ r = kvm_apic_set_irq(lowest, irq, dest_map);
return r;
}
OpenPOWER on IntegriCloud