diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-04-04 03:41:32 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-04-05 08:19:07 -0400 |
commit | 9c650d09a9c3029cc90cae5d2cd7ab131bdb86c2 (patch) | |
tree | ebca9199dd2be43af77cf6535acb63cd3f304cb0 | |
parent | 14f4760562e41d50817d56b42c821d70ad10b483 (diff) |
s390/mm/kvm: fix mis-merge in gmap handling
commit 1e133ab296f3 ("s390/mm: split arch/s390/mm/pgtable.c") dropped
some changes from commit a3a92c31bf0b ("KVM: s390: fix mismatch
between user and in-kernel guest limit") - this breaks KVM for some
memory sizes (kvm-s390: failed to commit memory region) like
exactly 2GB.
Cc: Dominik Dingel <dingel@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/s390/mm/gmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c index 69247b4dcc43..cace818d86eb 100644 --- a/arch/s390/mm/gmap.c +++ b/arch/s390/mm/gmap.c | |||
@@ -23,7 +23,7 @@ | |||
23 | /** | 23 | /** |
24 | * gmap_alloc - allocate a guest address space | 24 | * gmap_alloc - allocate a guest address space |
25 | * @mm: pointer to the parent mm_struct | 25 | * @mm: pointer to the parent mm_struct |
26 | * @limit: maximum size of the gmap address space | 26 | * @limit: maximum address of the gmap address space |
27 | * | 27 | * |
28 | * Returns a guest address space structure. | 28 | * Returns a guest address space structure. |
29 | */ | 29 | */ |
@@ -292,7 +292,7 @@ int gmap_map_segment(struct gmap *gmap, unsigned long from, | |||
292 | if ((from | to | len) & (PMD_SIZE - 1)) | 292 | if ((from | to | len) & (PMD_SIZE - 1)) |
293 | return -EINVAL; | 293 | return -EINVAL; |
294 | if (len == 0 || from + len < from || to + len < to || | 294 | if (len == 0 || from + len < from || to + len < to || |
295 | from + len > TASK_MAX_SIZE || to + len > gmap->asce_end) | 295 | from + len - 1 > TASK_MAX_SIZE || to + len - 1 > gmap->asce_end) |
296 | return -EINVAL; | 296 | return -EINVAL; |
297 | 297 | ||
298 | flush = 0; | 298 | flush = 0; |