KVM: s390/cmm: Fix prefix handling for diag 10 balloon
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 3 Sep 2014 19:23:13 +0000 (21:23 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 10 Sep 2014 10:19:42 +0000 (12:19 +0200)
commitf7a960affc6e5a33e8c7fcef065affc4f0461041
tree4ffa230638dd30ef0f82201b3c3a6945bc4f35fd
parent6b331952f1bc2df61c98954e25578629c439e417
KVM: s390/cmm: Fix prefix handling for diag 10 balloon

The old handling of prefix pages was broken in the diag10 ballooner.
We now rely on gmap_discard to check for start > end and do a
slow path if the prefix swap pages are affected:
1. discard the pages from start to prefix
2. discard the absolute 0 pages
3. discard the pages after prefix swap to end

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
arch/s390/kvm/diag.c