aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-04-18 11:19:59 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-06-20 03:54:45 -0400
commit00fc062d5364174b94e3b5780c22e95c0fb4b60a (patch)
tree4043afa6362bb3b190f93f8231669da13bfaab68 /arch/s390/kvm
parentf4debb40903978bbddfb9e877ca4d2f27e26567f (diff)
s390/mm: push ste protection down to shadow pte
If a guest ste is read-only, it doesn't make sense to force the ptes in as writable in the host. If the source page is read-only in the host, it won't have to be made writable. Please note that if the source page is not available, it will still be faulted in writable. This can be changed internally later on. If ste protection is removed, underlying shadow tables are also removed, therefore this change does not affect the guest. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
index e70f916c1079..a85bc6c6a098 100644
--- a/arch/s390/kvm/gaccess.c
+++ b/arch/s390/kvm/gaccess.c
@@ -1111,6 +1111,7 @@ int kvm_s390_shadow_fault(struct kvm_vcpu *vcpu, struct gmap *sg,
1111 rc = PGM_PAGE_TRANSLATION; 1111 rc = PGM_PAGE_TRANSLATION;
1112 if (!rc && (pte.z || pte.co)) 1112 if (!rc && (pte.z || pte.co))
1113 rc = PGM_TRANSLATION_SPEC; 1113 rc = PGM_TRANSLATION_SPEC;
1114 pte.p |= dat_protection;
1114 if (!rc) 1115 if (!rc)
1115 rc = gmap_shadow_page(sg, saddr, __pte(pte.val)); 1116 rc = gmap_shadow_page(sg, saddr, __pte(pte.val));
1116 ipte_unlock(vcpu); 1117 ipte_unlock(vcpu);