]> git.baikalelectronics.ru Git - kernel.git/commit
kvm/ppc/e500: eliminate tlb_refs
authorScott Wood <scottwood@freescale.com>
Wed, 6 Mar 2013 16:02:49 +0000 (16:02 +0000)
committerAlexander Graf <agraf@suse.de>
Thu, 11 Apr 2013 13:53:43 +0000 (15:53 +0200)
commit6d2f166caf86af65d14835e5b5b5630f7f819974
tree59bbb188fed8951f6aa7e0ff4d326755aaaa8f1b
parentbd38c53c84426a85114f505e0079f2fe55e22066
kvm/ppc/e500: eliminate tlb_refs

Commit 5f8bc19bdebc88851b0e5d5725c57bb5c9de8066 ("KVM: PPC: E500:
Explicitly mark shadow maps invalid") began using E500_TLB_VALID
for guest TLB1 entries, and skipping invalidations if it's not set.

However, when E500_TLB_VALID was set for such entries, it was on a
fake local ref, and so the invalidations never happen.  gtlb_privs
is documented as being only for guest TLB0, though we already violate
that with E500_TLB_BITMAP.

Now that we have MMU notifiers, and thus don't need to actually
retain a reference to the mapped pages, get rid of tlb_refs, and
use gtlb_privs for E500_TLB_VALID in TLB1.

Since we can have more than one host TLB entry for a given tlbe_ref,
be careful not to clear existing flags that are relevant to other
host TLB entries when preparing a new host TLB entry.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/e500.h
arch/powerpc/kvm/e500_mmu_host.c