kernel-aes67/drivers/kvm
Avi Kivity c7addb9020 KVM: Allow not-present guest page faults to bypass kvm
There are two classes of page faults trapped by kvm:
 - host page faults, where the fault is needed to allow kvm to install
   the shadow pte or update the guest accessed and dirty bits
 - guest page faults, where the guest has faulted and kvm simply injects
   the fault back into the guest to handle

The second class, guest page faults, is pure overhead.  We can eliminate
some of it on vmx using the following evil trick:
 - when we set up a shadow page table entry, if the corresponding guest pte
   is not present, set up the shadow pte as not present
 - if the guest pte _is_ present, mark the shadow pte as present but also
   set one of the reserved bits in the shadow pte
 - tell the vmx hardware not to trap faults which have the present bit clear

With this, normal page-not-present faults go directly to the guest,
bypassing kvm entirely.

Unfortunately, this trick only works on Intel hardware, as AMD lacks a
way to discriminate among page faults based on error code.  It is also
a little risky since it uses reserved bits which might become unreserved
in the future, so a module parameter is provided to disable it.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-01-30 17:52:48 +02:00
..
i8259.c KVM: Add get/set irqchip ioctls for in-kernel PIC live migration support 2007-10-13 10:18:25 +02:00
ioapic.c KVM: In-kernel I/O APIC model 2007-10-13 10:18:25 +02:00
irq.c KVM: deliver PIC interrupt only to vcpu0 2007-10-13 10:18:26 +02:00
irq.h KVM: enable in-kernel APIC INIT/SIPI handling 2007-10-13 10:18:26 +02:00
Kconfig Consolidate host virtualization support under Virtualization menu 2007-10-23 15:49:47 +10:00
kvm_main.c KVM: Allow not-present guest page faults to bypass kvm 2008-01-30 17:52:48 +02:00
kvm_svm.h KVM: Dynamically allocate vcpus 2007-10-13 10:18:20 +02:00
kvm.h KVM: Allow not-present guest page faults to bypass kvm 2008-01-30 17:52:48 +02:00
lapic.c KVM: Improve local apic timer wraparound handling 2007-10-22 12:03:29 +02:00
Makefile KVM: In-kernel I/O APIC model 2007-10-13 10:18:25 +02:00
mmu.c KVM: Allow not-present guest page faults to bypass kvm 2008-01-30 17:52:48 +02:00
paging_tmpl.h KVM: Allow not-present guest page faults to bypass kvm 2008-01-30 17:52:48 +02:00
segment_descriptor.h
svm.c KVM: Call x86_decode_insn() only when needed 2008-01-30 17:52:47 +02:00
svm.h KVM: SVM: Reliably detect if SVM was disabled by BIOS 2007-07-16 12:05:49 +03:00
vmx.c KVM: Allow not-present guest page faults to bypass kvm 2008-01-30 17:52:48 +02:00
vmx.h KVM: VMX: Use shadow TPR/cr8 for 64-bits guests 2007-10-13 10:18:26 +02:00
x86_emulate.c KVM: Call x86_decode_insn() only when needed 2008-01-30 17:52:47 +02:00
x86_emulate.h KVM: emulate_instruction() calls now x86_decode_insn() and x86_emulate_insn() 2008-01-30 17:52:47 +02:00