linux/arch
Wanpeng Li 5c614b3583 KVM: nVMX: nested VPID emulation
VPID is used to tag address space and avoid a TLB flush. Currently L0 use
the same VPID to run L1 and all its guests. KVM flushes VPID when switching
between L1 and L2.

This patch advertises VPID to the L1 hypervisor, then address space of L1
and L2 can be separately treated and avoid TLB flush when swithing between
L1 and L2. For each nested vmentry, if vpid12 is changed, reuse shadow vpid
w/ an invvpid.

Performance:

run lmbench on L2 w/ 3.5 kernel.

Context switching - times in microseconds - smaller is better
-------------------------------------------------------------------------
Host                 OS  2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
                         ctxsw  ctxsw  ctxsw ctxsw  ctxsw   ctxsw   ctxsw
--------- ------------- ------ ------ ------ ------ ------ ------- -------
kernel    Linux 3.5.0-1 1.2200 1.3700 1.4500 4.7800 2.3300 5.60000 2.88000  nested VPID
kernel    Linux 3.5.0-1 1.2600 1.4300 1.5600   12.7   12.9 3.49000 7.46000  vanilla

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Wincy Van <fanwenyi0529@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-10-16 10:30:35 +02:00
..
alpha PCI updates for v4.3: 2015-09-25 11:16:53 -07:00
arc genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
arm Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-09-27 06:48:48 -04:00
arm64 AMD fixes for bugs introduced in the 4.2 merge window, 2015-09-25 10:51:40 -07:00
avr32 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
blackfin genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
c6x genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
cris CRISv10: delete unused lib/dmacopy.c 2015-09-05 00:56:51 +02:00
frv PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code" 2015-09-15 13:18:04 -05:00
h8300 dma-mapping: consolidate dma_set_mask 2015-09-10 13:29:01 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2015-09-10 18:19:42 -07:00
ia64 PCI updates for v4.3: 2015-09-25 11:16:53 -07:00
m32r lib/decompressors: use real out buf size for gunzip with kernel 2015-09-10 13:29:01 -07:00
m68k genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
metag genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
microblaze PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code" 2015-09-15 13:18:04 -05:00
mips PCI updates for v4.3: 2015-09-25 11:16:53 -07:00
mn10300 PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code" 2015-09-15 13:18:04 -05:00
nios2 nios2: add Max10 defconfig 2015-09-08 18:16:02 +08:00
openrisc dma-mapping: consolidate dma_set_mask 2015-09-10 13:29:01 -07:00
parisc parisc: Use platform_device_register_simple("rtc-generic") 2015-09-08 17:53:48 +02:00
powerpc PCI updates for v4.3: 2015-09-25 11:16:53 -07:00
s390 KVM: s390: factor out reading of the guest TOD clock 2015-10-13 15:50:35 +02:00
score Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:04:50 -07:00
sh genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
sparc genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
tile genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
um Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:04:50 -07:00
unicore32 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
x86 KVM: nVMX: nested VPID emulation 2015-10-16 10:30:35 +02:00
xtensa PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code" 2015-09-15 13:18:04 -05:00
.gitignore
Kconfig kexec: split kexec_load syscall from kexec core code 2015-09-10 13:29:01 -07:00