KVM: s390/mm: use radix trees for guest to host mappings
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 30 Apr 2014 14:04:25 +0000 (16:04 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 26 Aug 2014 08:09:02 +0000 (10:09 +0200)
commit527e30b41d8b86e9ae7f5b740de416958c0e574e
treea19053eaa5ab6bb2f705006a0f7b5b90bb4a1a0b
parent6e0a0431bf7d90ed0b8a0a974ad219617a70cc22
KVM: s390/mm: use radix trees for guest to host mappings

Store the target address for the gmap segments in a radix tree
instead of using invalid segment table entries. gmap_translate
becomes a simple radix_tree_lookup, gmap_fault is split into the
address translation with gmap_translate and the part that does
the linking of the gmap shadow page table with the process page
table.
A second radix tree is used to keep the pointers to the segment
table entries for segments that are mapped in the guest address
space. On unmap of a segment the pointer is retrieved from the
radix tree and is used to carry out the segment invalidation in
the gmap shadow page table. As the radix tree can only store one
pointer, each host segment may only be mapped to exactly one
guest location.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/pgalloc.h
arch/s390/include/asm/pgtable.h
arch/s390/include/asm/tlb.h
arch/s390/kvm/kvm-s390.c
arch/s390/mm/fault.c
arch/s390/mm/pgtable.c
arch/s390/mm/vmem.c