* [Qemu-devel] s390x: change mapping base to allow guests > 2GB
@ 2011-05-10 12:49 Christian Borntraeger
2011-05-11 22:37 ` Alexander Graf
0 siblings, 1 reply; 2+ messages in thread
From: Christian Borntraeger @ 2011-05-10 12:49 UTC (permalink / raw)
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 <borntraeger@de.ibm.com>
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] s390x: change mapping base to allow guests > 2GB
2011-05-10 12:49 [Qemu-devel] s390x: change mapping base to allow guests > 2GB Christian Borntraeger
@ 2011-05-11 22:37 ` Alexander Graf
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2011-05-11 22:37 UTC (permalink / raw)
To: Christian Borntraeger; +Cc: Carsten Otte, qemu-devel@nongnu.org
On 10.05.2011, at 14:49, Christian Borntraeger wrote:
> 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 <borntraeger@de.ibm.com>
Thanks, applied to the s390-next tree. Also, please dont't address me directly in the patch description, as that one's supposed to go to the public :).
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-11 22:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 12:49 [Qemu-devel] s390x: change mapping base to allow guests > 2GB Christian Borntraeger
2011-05-11 22:37 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).