summaryrefslogtreecommitdiff
path: root/arch/s390/kvm/gaccess.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-01-27 17:18:41 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-06-20 09:54:34 +0200
commit7a6741576b268820c8bd2b66288e6ff3bc57d4a7 (patch)
tree305b26510f3c526c03f2cc0ab0bc35b7b71a813b /arch/s390/kvm/gaccess.c
parente52f8b6112353e9e8eac64f082bfbc65e64bb2dd (diff)
s390/mm: protection exceptions are corrrectly shadowed
As gmap shadows contains correct protection permissions, protection exceptons can directly be forwarded to guest 3. If we would encounter a protection exception while faulting, the next guest 3 run will automatically handle that for us. Keep the dat_protection logic in place, as it will be helpful later. 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/gaccess.c')
-rw-r--r--arch/s390/kvm/gaccess.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
index 5b5eee2d51cd..b2783dd71854 100644
--- a/arch/s390/kvm/gaccess.c
+++ b/arch/s390/kvm/gaccess.c
@@ -1075,7 +1075,6 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
* kvm_s390_shadow_fault - handle fault on a shadow page table
* @sg: pointer to the shadow guest address space structure
* @saddr: faulting address in the shadow gmap
- * @write: =1 map r/w, =0 map r/o
*
* Returns: - 0 if the shadow fault was successfully resolved
* - > 0 (pgm exception code) on exceptions while faulting
@@ -1083,7 +1082,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
* - -EFAULT when accessing invalid guest addresses
* - -ENOMEM if out of memory
*/
-int kvm_s390_shadow_fault(struct gmap *sg, unsigned long saddr, int write)
+int kvm_s390_shadow_fault(struct gmap *sg, unsigned long saddr)
{
union vaddress vaddr;
union page_table_entry pte;
@@ -1104,9 +1103,6 @@ int kvm_s390_shadow_fault(struct gmap *sg, unsigned long saddr, int write)
rc = PGM_PAGE_TRANSLATION;
if (!rc && (pte.z || pte.co))
rc = PGM_TRANSLATION_SPEC;
- dat_protection |= pte.p;
- if (!rc && write && dat_protection)
- rc = PGM_PROTECTION;
if (!rc)
rc = gmap_shadow_page(sg, saddr, __pte(pte.val));
up_read(&sg->mm->mmap_sem);