From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJmNL-0005dL-Ej for qemu-devel@nongnu.org; Tue, 10 May 2011 08:49:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJmNH-0004zg-6R for qemu-devel@nongnu.org; Tue, 10 May 2011 08:49:19 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:57884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJmNG-0004z7-VE for qemu-devel@nongnu.org; Tue, 10 May 2011 08:49:15 -0400 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p4ACnBYx022158 for ; Tue, 10 May 2011 12:49:11 GMT Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4ACnBWV1745006 for ; Tue, 10 May 2011 13:49:11 +0100 Received: from d06av08.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4ACnBlE001704 for ; Tue, 10 May 2011 13:49:11 +0100 Message-ID: <4DC93446.3000807@de.ibm.com> Date: Tue, 10 May 2011 14:49:10 +0200 From: Christian Borntraeger MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] s390x: change mapping base to allow guests > 2GB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Carsten Otte , "qemu-devel@nongnu.org" Alex, the current s390x qemu memory layout is 0x1000000: guest start 0x80000000: qemu binary which limits the amount of available memory to <2GB. This patch moves the guest pages to 32GB to not collide with the binary and to leave some space for the program break of qemu. Signed-off-by: Christian Borntraeger Make sure that big guests (e.g. 4 GB do not collide with the binary) --- qemu-kvm.orig/exec.c 2011-05-04 09:25:22.411957322 +0200 +++ qemu-kvm/exec.c 2011-05-10 14:45:28.158409982 +0200 @@ -2900,10 +2900,14 @@ #endif } else { #if defined(TARGET_S390X) && defined(CONFIG_KVM) - /* XXX S390 KVM requires the topmost vma of the RAM to be < 256GB */ - new_block->host = mmap((void*)0x1000000, size, + /* S390 KVM requires the topmost vma of the RAM to be smaller than + an system defined value, which is at least 256GB. Larger systems + have larger values. We put the guest between the end of data + segment (system break) and this value. We use 32GB as a base to + have enough room for the system break to grow. */ + new_block->host = mmap((void*)0x800000000, size, PROT_EXEC|PROT_READ|PROT_WRITE, - MAP_SHARED | MAP_ANONYMOUS, -1, 0); + MAP_SHARED | MAP_ANONYMOUS | MAP_FIXED, -1, 0); #else new_block->host = qemu_vmalloc(size); #endif