alistair23-linux/arch/x86
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
..
boot doc: fix broken references 2011-09-27 18:08:04 +02:00
configs iommu: Rename the DMAR and INTR_REMAP config options 2011-09-21 10:22:03 +02:00
crypto Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ia32 Cross Memory Attach 2011-10-31 17:30:44 -07:00
include/asm Revert "x86, efi: Calling __pa() with an ioremap()ed address is invalid" 2011-12-12 18:25:56 +01:00
kernel x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT 2011-12-19 13:09:56 -08:00
kvm KVM: nVMX: Add KVM_REQ_IMMEDIATE_EXIT 2011-12-27 11:16:43 +02:00
lguest lguest: add export.h to lguest files for THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:32:13 -04:00
lib x86: Fix insn decoder for longer instruction 2011-10-10 09:05:51 +02:00
math-emu
mm thp: add compound tail page _mapcount when mapped 2011-12-09 07:50:28 -08:00
net net: bpf_jit: fix an off-one bug in x86_64 cond jump target 2011-12-19 15:47:29 -05:00
oprofile Merge branch 'urgent' of git://amd64.org/linux/rric into perf/urgent 2011-11-15 11:03:30 +01:00
pci x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:35 -04:00
platform Revert "x86, efi: Calling __pa() with an ioremap()ed address is invalid" 2011-12-12 18:25:56 +01:00
power x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:35 -04:00
tools
um fix braino in um patchset (mea culpa) 2011-11-21 12:10:21 -08:00
vdso Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-28 05:03:12 -07:00
video x86: fix up files really needing to include module.h 2011-10-31 19:30:36 -04:00
xen Merge branch 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-12-15 10:52:40 -08:00
.gitignore
Kbuild
Kconfig x86/intel_mid: Kconfig select fix 2011-12-06 14:40:50 +01:00
Kconfig.cpu
Kconfig.debug doc: fix broken references 2011-09-27 18:08:04 +02:00
Makefile
Makefile.um um: take arch/um/sys-x86 to arch/x86/um 2011-11-02 14:15:05 +01:00
Makefile_32.cpu