WSL2-Linux-Kernel/arch/powerpc
Hollis Blanchard 7924bd4109 KVM: ppc: directly insert shadow mappings into the hardware TLB
Formerly, we used to maintain a per-vcpu shadow TLB and on every entry to the
guest would load this array into the hardware TLB. This consumed 1280 bytes of
memory (64 entries of 16 bytes plus a struct page pointer each), and also
required some assembly to loop over the array on every entry.

Instead of saving a copy in memory, we can just store shadow mappings directly
into the hardware TLB, accepting that the host kernel will clobber these as
part of the normal 440 TLB round robin. When we do that we need less than half
the memory, and we have decreased the exit handling time for all guest exits,
at the cost of increased number of TLB misses because the host overwrites some
guest entries.

These savings will be increased on processors with larger TLBs or which
implement intelligent flush instructions like tlbivax (which will avoid the
need to walk arrays in software).

In addition to that and to the code simplification, we have a greater chance of
leaving other host userspace mappings in the TLB, instead of forcing all
subsequent tasks to re-fault all their mappings.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2008-12-31 16:55:09 +02:00
..
boot Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-12-28 16:54:33 -08:00
configs Merge branch 'next' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into next 2008-12-17 11:01:43 +11:00
include/asm KVM: ppc: directly insert shadow mappings into the hardware TLB 2008-12-31 16:55:09 +02:00
kernel KVM: ppc: directly insert shadow mappings into the hardware TLB 2008-12-31 16:55:09 +02:00
kvm KVM: ppc: directly insert shadow mappings into the hardware TLB 2008-12-31 16:55:09 +02:00
lib Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-12-28 16:54:33 -08:00
math-emu powerpc: Add SPE/EFP math emulation for E500v1/v2 processors. 2008-12-03 08:19:16 -06:00
mm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-12-28 16:54:33 -08:00
oprofile powerpc/cell/OProfile: Fix on-stack array size in activate spu profiling function 2008-10-31 16:13:51 +11:00
platforms Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
sysdev Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-12-28 16:54:33 -08:00
xmon powerpc: Prepare xmon_save_regs for use with kdump 2008-12-23 15:13:28 +11:00
Kconfig Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-12-28 16:54:33 -08:00
Kconfig.debug powerpc: Allow the max stack trace depth to be configured 2008-12-03 20:46:35 +11:00
Makefile powerpc: Remove unncessary SPE related compiler flag 2008-12-03 08:19:10 -06:00