summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Gang <chengang@emindsoft.com.cn>2015-12-24 09:07:33 +0800
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:23 -0600
commit50e49c58098958bb43fc0491e2af4fb817011922 (patch)
treeaf4965e311886def2e2fc6d57299e255ede58180
parent8599b60df36c1c662ced484f315e78dc3c2438be (diff)
downloadhqemu-50e49c58098958bb43fc0491e2af4fb817011922.zip
hqemu-50e49c58098958bb43fc0491e2af4fb817011922.tar.gz
linux-user/mmap.c: Use end instead of real_end in target_mmap
The fragment must effectively be mapped only to "end" not to "real_end" (which is a host page aligned address, and thus this is not a fragment). It is consistent with what it is done in the case of one single page. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-rw-r--r--linux-user/mmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index c6c478e..445e8c6 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -538,7 +538,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
/* handle the end of the mapping */
if (end < real_end) {
ret = mmap_frag(real_end - qemu_host_page_size,
- real_end - qemu_host_page_size, real_end,
+ real_end - qemu_host_page_size, end,
prot, flags, fd,
offset + real_end - qemu_host_page_size - start);
if (ret == -1)
OpenPOWER on IntegriCloud