linux-stable/arch/s390
Martin Schwidefsky 4be130a084 s390/mm: add shadow gmap support
For a nested KVM guest the outer KVM host needs to create shadow
page tables for the nested guest. This patch adds the basic support
to the guest address space (gmap) code.

For each guest address space the inner KVM host creates, the first
outer KVM host needs to create shadow page tables. The address space
is identified by the ASCE loaded into the control register 1 at the
time the inner SIE instruction for the second nested KVM guest is
executed. The outer KVM host creates the shadow tables starting with
the table identified by the ASCE on a on-demand basis. The outer KVM
host will get repeated faults for all the shadow tables needed to
run the second KVM guest.

While a shadow page table for the second KVM guest is active the access
to the origin region, segment and page tables needs to be restricted
for the first KVM guest. For region and segment and page tables the first
KVM guest may read the memory, but write attempt has to lead to an
unshadow.  This is done using the page invalid and read-only bits in the
page table of the first KVM guest. If the first guest re-accesses one of
the origin pages of a shadow, it gets a fault and the affected parts of
the shadow page table hierarchy needs to be removed again.

PGSTE tables don't have to be shadowed, as all interpretation assist can't
deal with the invalid bits in the shadow pte being set differently than
the original ones provided by the first KVM guest.

Many bug fixes and improvements by David Hildenbrand.

Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2016-06-20 09:54:04 +02:00
..
appldata s390: appldata: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
boot kbuild: delete unnecessary "@:" 2016-04-20 10:36:57 +02:00
configs s390/config: update default configuration 2016-05-23 09:11:37 +02:00
crypto s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
hypfs s390: Make diag224 public 2016-06-10 12:07:10 +02:00
include s390/mm: add shadow gmap support 2016-06-20 09:54:04 +02:00
kernel s390: Make diag224 public 2016-06-10 12:07:10 +02:00
kvm s390/mm: add reference counter to gmap structure 2016-06-20 09:53:59 +02:00
lib s390/spinlock: avoid yield to non existent cpu 2016-04-15 18:01:48 +02:00
mm s390/mm: add shadow gmap support 2016-06-20 09:54:04 +02:00
net s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop 2016-05-19 09:14:27 +02:00
numa s390/numa: move numa_init_late() from device to arch_initcall 2016-01-26 12:45:24 +01:00
oprofile s390/oprofile: add z13/z13s model numbers 2016-02-24 12:18:10 +01:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-05-18 12:17:16 -07:00
tools s390/facilities: add helper tool to generate facility lists 2015-12-18 14:59:20 +01:00
defconfig s390/config: update default configuration 2016-05-23 09:11:37 +02:00
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig lib/GCD.c: use binary GCD algorithm instead of Euclidean 2016-05-20 17:58:30 -07:00
Kconfig.debug arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug 2016-01-09 06:30:49 -08:00
Makefile s390/facilities: add helper tool to generate facility lists 2015-12-18 14:59:20 +01:00