diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2011-05-10 14:49:10 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-05-20 17:35:13 +0200 |
commit | ff83678aee5269619338645ec23b00b1c7506fca (patch) | |
tree | 5780f92fee36919e46390da9e254a945d099ddc9 /exec.c | |
parent | a74cdab44d6d7a5077991bd2c8b426c2978a80da (diff) | |
download | qemu-ff83678aee5269619338645ec23b00b1c7506fca.tar.gz qemu-ff83678aee5269619338645ec23b00b1c7506fca.tar.bz2 qemu-ff83678aee5269619338645ec23b00b1c7506fca.zip |
s390x: change mapping base to allow guests > 2GB
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>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2910,10 +2910,14 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, #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 if (xen_mapcache_enabled()) { xen_ram_alloc(new_block->offset, size); |