On Tue, May 22, 2012 at 05:05:47PM +0300, Michael S. Tsirkin wrote:
Implementation of PV EOI using shared memory.
This reduces the number of exits an interrupt
causes as much as by half.
The idea is simple: there's a bit, per APIC, in guest memory,
that tells the guest that it does not need
On Thu, May 31, 2012 at 12:57:10PM +0300, Gleb Natapov wrote:
@@ -1345,17 +1437,40 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu
*vcpu)
apic_set_tpr(vcpu-arch.apic, data 0xff);
}
+/*
+ * apic_sync_pv_eoi_to_guest - called before vmentry
+ *
+ * Detect whether it's
On Thu, May 31, 2012 at 01:11:11PM +0300, Michael S. Tsirkin wrote:
On Thu, May 31, 2012 at 12:57:10PM +0300, Gleb Natapov wrote:
@@ -1345,17 +1437,40 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu
*vcpu)
apic_set_tpr(vcpu-arch.apic, data 0xff);
}
+/*
+ *
On Thu, May 31, 2012 at 01:15:13PM +0300, Gleb Natapov wrote:
+ /* Cache not set: safe but we don't bother. */
+ unlikely(apic-isr_cache == -1) ||
+ /* Need EOI to update ioapic. */
+ unlikely(kvm_ioapic_handles_vector(vcpu-kvm,