KVM: s390: fix mismatch between user and in-kernel guest limit
authorDominik Dingel <dingel@linux.vnet.ibm.com>
Mon, 1 Dec 2014 16:24:42 +0000 (17:24 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 15 Dec 2015 16:08:21 +0000 (17:08 +0100)
commita3a92c31bf0b57ad0ca7f092a6f3a57168ba9ae2
tree1e8fd0810ebeb5331a8cb3ec700b023a17162aaa
parent8335713ad08caf2c3dfcb5bc2c93d7e0276142d4
KVM: s390: fix mismatch between user and in-kernel guest limit

While the userspace interface requests the maximum size the gmap code
expects to get a maximum address.

This error resulted in bigger page tables than necessary for some guest
sizes, e.g. a 2GB guest used 3 levels instead of 2.

At the same time we introduce KVM_S390_NO_MEM_LIMIT, which allows in a
bright future that a guest spans the complete 64 bit address space.

We also switch to TASK_MAX_SIZE for the initial memory size, this is a
cosmetic change as the previous size also resulted in a 4 level pagetable
creation.

Reported-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Documentation/virtual/kvm/devices/vm.txt
arch/s390/include/asm/kvm_host.h
arch/s390/include/uapi/asm/kvm.h
arch/s390/kvm/kvm-s390.c
arch/s390/mm/pgtable.c