2011-02-16 20:30:51 +01:00
|
|
|
From 2013ec7c2d1b5a71d73701da746363b69d4c992c Mon Sep 17 00:00:00 2001
|
2009-08-11 17:37:13 +02:00
|
|
|
From: Ulrich Hecht <uli@suse.de>
|
|
|
|
Date: Tue, 14 Apr 2009 16:34:05 +0200
|
2011-02-16 20:30:51 +01:00
|
|
|
Subject: [PATCH 10/17] qemu-cvs-mmap-amd64
|
2009-08-11 17:37:13 +02:00
|
|
|
|
|
|
|
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
|
2011-02-16 20:30:51 +01:00
|
|
|
index e18c228..de8abe9 100644
|
2009-08-11 17:37:13 +02:00
|
|
|
--- 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
|
|
|
|
|
2011-02-16 20:30:51 +01:00
|
|
|
#if defined(CONFIG_USE_NPTL)
|
|
|
|
@@ -169,7 +173,7 @@ static int mmap_frag(abi_ulong real_start,
|
2009-08-11 17:37:13 +02:00
|
|
|
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;
|
|
|
|
--
|
2011-02-16 20:30:51 +01:00
|
|
|
1.7.1
|
2009-08-11 17:37:13 +02:00
|
|
|
|