diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-06-24 19:25:07 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-06-25 12:40:55 +0300 |
commit | ae7a2a3fb6f8b784c2752863f4f1f20c656f76fb (patch) | |
tree | 5f4053265d244bb12ccff88494d70124b6d603c3 /arch/x86/kvm/lapic.h | |
parent | d905c0693514e6f713b207377b67c9972c5d7d49 (diff) | |
download | op-kernel-dev-ae7a2a3fb6f8b784c2752863f4f1f20c656f76fb.zip op-kernel-dev-ae7a2a3fb6f8b784c2752863f4f1f20c656f76fb.tar.gz |
KVM: host side for eoi optimization
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 EOI.
We set it before injecting an interrupt and clear
before injecting a nested one. Guest tests it using
a test and clear operation - this is necessary
so that host can detect interrupt nesting -
and if set, it can skip the EOI MSR.
There's a new MSR to set the address of said register
in guest memory. Otherwise not much changed:
- Guest EOI is not required
- Register is tested & ISR is automatically cleared on exit
For testing results see description of previous patch
'kvm_para: guest side for eoi avoidance'.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r-- | arch/x86/kvm/lapic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index 5ac9e5e..4af5405 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h @@ -69,4 +69,6 @@ static inline bool kvm_hv_vapic_assist_page_enabled(struct kvm_vcpu *vcpu) { return vcpu->arch.hv_vapic & HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE; } + +int kvm_lapic_enable_pv_eoi(struct kvm_vcpu *vcpu, u64 data); #endif |