android_kernel_motorola_sm6225/arch/x86/kvm
Nadav Har'El d6185f20a0 KVM: nVMX: Add KVM_REQ_IMMEDIATE_EXIT
This patch adds a new vcpu->requests bit, KVM_REQ_IMMEDIATE_EXIT.
This bit requests that when next entering the guest, we should run it only
for as little as possible, and exit again.

We use this new option in nested VMX: When L1 launches L2, but L0 wishes L1
to continue running so it can inject an event to it, we unfortunately cannot
just pretend to have run L2 for a little while - We must really launch L2,
otherwise certain one-off vmcs12 parameters (namely, L1 injection into L2)
will be lost. So the existing code runs L2 in this case.
But L2 could potentially run for a long time until it exits, and the
injection into L1 will be delayed. The new KVM_REQ_IMMEDIATE_EXIT allows us
to request that L2 will be entered, as necessary, but will exit as soon as
possible after entry.

Our implementation of this request uses smp_send_reschedule() to send a
self-IPI, with interrupts disabled. The interrupts remain disabled until the
guest is entered, and then, after the entry is complete (often including
processing an injection and jumping to the relevant handler), the physical
interrupt is noticed and causes an exit.

On recent Intel processors, we could have achieved the same goal by using
MTF instead of a self-IPI. Another technique worth considering in the future
is to use VM_EXIT_ACK_INTR_ON_EXIT and a highest-priority vector IPI - to
slightly improve performance by avoiding the useless interrupt handler
which ends up being called when smp_send_reschedule() is used.

Signed-off-by: Nadav Har'El <nyh@il.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-27 11:16:43 +02:00
..
emulate.c KVM: x86 emulator: convert push %sreg/pop %sreg to direct decode 2011-09-25 19:52:58 +03:00
i8254.c KVM: x86: Prevent starting PIT timers in the absence of irqchip support 2011-12-25 17:13:18 +02:00
i8254.h KVM: remove useless function declaration kvm_inject_pit_timer_irqs() 2011-05-11 07:57:09 -04:00
i8259.c KVM: Clean up and extend rate-limited output 2011-09-25 19:52:43 +03:00
irq.c KVM: fix typo in copyright notice 2010-10-24 10:53:14 +02:00
irq.h KVM: Intelligent device lookup on I/O bus 2011-09-25 19:17:59 +03:00
Kconfig KVM: uses TASKSTATS, depends on NET 2011-08-16 19:00:41 +03:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
kvm_timer.h KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
lapic.c KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
lapic.h KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
Makefile KVM: x86: Makefile clean up 2011-01-12 11:29:08 +02:00
mmu.c KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
mmu.h KVM: MMU: mmio page fault support 2011-07-24 11:50:40 +03:00
mmu_audit.c KVM: Clean up and extend rate-limited output 2011-09-25 19:52:43 +03:00
mmutrace.h KVM: MMU: trace mmio page fault 2011-07-24 11:50:41 +03:00
paging_tmpl.h KVM: MMU: Fix SMEP failure during fetch 2011-09-25 19:18:02 +03:00
svm.c KVM: SVM: Keep intercepting task switching with NPT enabled 2011-10-30 12:24:10 +02:00
timer.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
trace.h KVM: Use __print_symbolic() for vmexit tracepoints 2011-09-25 19:17:59 +03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: nVMX: Add KVM_REQ_IMMEDIATE_EXIT 2011-12-27 11:16:43 +02:00
x86.c KVM: nVMX: Add KVM_REQ_IMMEDIATE_EXIT 2011-12-27 11:16:43 +02:00
x86.h KVM: MMU: cache mmio info on page fault path 2011-07-24 11:50:26 +03:00