aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-03-08 06:21:41 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-06-20 03:54:19 -0400
commita9d23e71d7716e394a772686bfd994f4e181b235 (patch)
tree1eb27541f5c1b5c3d9bf504e3cd9306d10b19adb /arch/s390/kvm
parenteea3678d4334925bf838e6f4bc88760811a84cd6 (diff)
s390/mm: shadow pages with real guest requested protection
We really want to avoid manually handling protection for nested virtualization. By shadowing pages with the protection the guest asked us for, the SIE can handle most protection-related actions for us (e.g. special handling for MVPG) and we can directly forward protection exceptions to the guest. PTEs will now always be shadowed with the correct _PAGE_PROTECT flag. Unshadowing will take care of any guest changes to the parent PTE and any host changes to the host PTE. If the host PTE doesn't have the fitting access rights or is not available, we have to fix it up. 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>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/gaccess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
index ba4985262bce..c5f79c1205cf 100644
--- a/arch/s390/kvm/gaccess.c
+++ b/arch/s390/kvm/gaccess.c
@@ -1109,7 +1109,7 @@ int kvm_s390_shadow_fault(struct gmap *sg, unsigned long saddr, int write)
1109 dat_protection |= pte.p; 1109 dat_protection |= pte.p;
1110 if (write && dat_protection) 1110 if (write && dat_protection)
1111 return PGM_PROTECTION; 1111 return PGM_PROTECTION;
1112 rc = gmap_shadow_page(sg, saddr, pte.pfra * 4096, write); 1112 rc = gmap_shadow_page(sg, saddr, __pte(pte.val));
1113 if (rc) 1113 if (rc)
1114 return rc; 1114 return rc;
1115 return 0; 1115 return 0;