virtualization/app-emulation/qemu/files/0.12.4/0010-qemu-cvs-mmap-amd64.patch
2010-10-10 08:02:11 +00:00

42 lines
1.2 KiB
Diff

From b22d5f62f9765ec734d7b14886d7aed5b61acf8b Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:34:05 +0200
Subject: [PATCH 10/16] qemu-cvs-mmap-amd64
Map stuff to address space < 4GB on AMD64. This patch got continually smaller
as most cases were this was an issue were dealt with in other ways. May
already be fully obsolete.
Signed-off-by: Ulrich Hecht <uli@suse.de>
---
linux-user/mmap.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 1ea202b..74b0d4b 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -31,6 +31,10 @@
#include "qemu.h"
#include "qemu-common.h"
+#if !defined(MAP_32BIT)
+#define MAP_32BIT 0
+#endif
+
//#define DEBUG_MMAP
#if defined(CONFIG_USE_NPTL)
@@ -230,7 +234,7 @@ static int mmap_frag(abi_ulong real_start,
if (prot1 == 0) {
/* no page was there, so we allocate one */
void *p = mmap(host_start, qemu_host_page_size, prot,
- flags | MAP_ANONYMOUS, -1, 0);
+ flags | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
if (p == MAP_FAILED)
return -1;
prot1 = prot;
--
1.6.4.2