]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: pfmf: fix end address calculation
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Wed, 13 Apr 2016 08:09:47 +0000 (10:09 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 10 Jun 2016 10:07:28 +0000 (12:07 +0200)
commit9c36c4928ebefc5da7fb6a3667b65f6e03e376dd
treee228ebab5b999145ff8b018d43a979915c03bcae
parenta47c875d5d61a0b41d7e599c3db7b347c588cfb8
KVM: s390: pfmf: fix end address calculation

The current calculation is wrong if absolute != real address. Let's just
calculate the start address for 4k frames upfront. Otherwise, the
calculated end address will be wrong, resulting in wrong memory
location/storage keys getting touched.

To keep low-address protection working (using the effective address),
we have to move the check.

Reviewed-by: Christian Borntraeger <borntraeger@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/priv.c