s390/mm: support EDAT2 for gmap shadows
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 18 Apr 2016 11:42:05 +0000 (13:42 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 20 Jun 2016 07:54:56 +0000 (09:54 +0200)
commit18b89809881834cecd2977e6048a30c4c8f140fe
tree7542079e9cbb1b59df833981ddd005a3524178bc
parentfd8d4e3ab6993e194287a59c4d3a6a43da86b8dc
s390/mm: support EDAT2 for gmap shadows

If the guest is enabled for EDAT2, we can easily create shadows for
guest2 -> guest3 provided tables that make use of EDAT2.

If guest2 references a 2GB page, this memory looks consecutive for guest2,
but it does not have to be so for us. Therefore we have to create fake
segment and page tables.

This works just like EDAT1 support, so page tables are removed when the
parent table (r3t table entry) is changed.

We don't hve to care about:
- ACCF-Validity Control in RTTE
- Access-Control Bits in RTTE
- Fetch-Protection Bit in RTTE
- Common-Region Bit in RTTE

Just like for EDAT1, all bits might be dropped and there is no guaranteed
that they are active.

Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/gmap.h
arch/s390/kvm/gaccess.c
arch/s390/mm/gmap.c