aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-07 11:19:13 +0200
committerAvi Kivity <avi@redhat.com>2009-12-07 11:19:13 +0200
commitf9a00c2b40de158c997d4a8dff581f088ffee0ab (patch)
tree35d3a69010def084090f00f72cf74d9b76a84738 /exec.c
parentMerge commit '10ec51174ca69a4c3c5149b0b3baaa6ccba66273' into upstream-merge (diff)
parentAllocate physical memory in low virtual address space (diff)
downloadqemu-kvm-f9a00c2b40de158c997d4a8dff581f088ffee0ab.tar.gz
qemu-kvm-f9a00c2b40de158c997d4a8dff581f088ffee0ab.tar.bz2
qemu-kvm-f9a00c2b40de158c997d4a8dff581f088ffee0ab.zip
Merge commit '6b02494d64a15476e26a6e8468623d01c4c75c58' into upstream-merge
* commit '6b02494d64a15476e26a6e8468623d01c4c75c58': Allocate physical memory in low virtual address space Add KVM support for S390x S/390 fake TCG implementation S/390 host/target build system support Conflicts: exec.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 9413e2953..8f873abab 100644
--- a/exec.c
+++ b/exec.c
@@ -2538,7 +2538,14 @@ ram_addr_t qemu_ram_alloc(ram_addr_t size)
new_block->host = file_ram_alloc(size, mem_path);
if (!new_block->host) {
+#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,
+ PROT_EXEC|PROT_READ|PROT_WRITE,
+ MAP_SHARED | MAP_ANONYMOUS, -1, 0);
+#else
new_block->host = qemu_vmalloc(size);
+#endif
#ifdef MADV_MERGEABLE
madvise(new_block->host, size, MADV_MERGEABLE);
#endif