]> git.karo-electronics.de Git - linux-beck.git/commitdiff
s390/mm: push ste protection down to shadow pte
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 18 Apr 2016 15:19:59 +0000 (17:19 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 20 Jun 2016 07:54:45 +0000 (09:54 +0200)
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>
arch/s390/kvm/gaccess.c

index e70f916c1079613ca0d7875bb99e3a525d0cc55b..a85bc6c6a098345da81e390db855f24362d32513 100644 (file)
@@ -1111,6 +1111,7 @@ int kvm_s390_shadow_fault(struct kvm_vcpu *vcpu, struct gmap *sg,
                rc = PGM_PAGE_TRANSLATION;
        if (!rc && (pte.z || pte.co))
                rc = PGM_TRANSLATION_SPEC;
+       pte.p |= dat_protection;
        if (!rc)
                rc = gmap_shadow_page(sg, saddr, __pte(pte.val));
        ipte_unlock(vcpu);