]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Improve split mode
authorAlexander Graf <agraf@suse.de>
Tue, 20 Apr 2010 00:49:48 +0000 (02:49 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:18:58 +0000 (12:18 +0300)
commit50a61802e52b9e009f2f87eed1a9d552f924ad0d
tree5aa5c5c9676d577b55bbc700f1d5a6ee5c137a27
parenta7224e9ae695e131a949c5370ea97de6f06d119c
KVM: PPC: Improve split mode

When in split mode, instruction relocation and data relocation are not equal.

So far we implemented this mode by reserving a special pseudo-VSID for the
two cases and flushing all PTEs when going into split mode, which is slow.

Unfortunately 32bit Linux and Mac OS X use split mode extensively. So to not
slow down things too much, I came up with a different idea: Mark the split
mode with a bit in the VSID and then treat it like any other segment.

This means we can just flush the shadow segment cache, but keep the PTEs
intact. I verified that this works with ppc32 Linux and Mac OS X 10.4
guests and does speed them up.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s_32_mmu.c
arch/powerpc/kvm/book3s_64_mmu.c