diff options
| author | Laurent Vivier <laurent@vivier.eu> | 2018-08-14 19:12:17 +0200 |
|---|---|---|
| committer | Laurent Vivier <laurent@vivier.eu> | 2018-08-17 13:56:33 +0200 |
| commit | 3e23de15237c81fe7af7c3ffa299a6ae5fec7d43 (patch) | |
| tree | 41b0808ca14091f7d436b1bd4c72c7065d24c263 /backends/hostmem-file.c | |
| parent | b8dbfc9cc662ba05ea0b8ffc4598e422b76fbcbd (diff) | |
| download | focaccia-qemu-3e23de15237c81fe7af7c3ffa299a6ae5fec7d43.tar.gz focaccia-qemu-3e23de15237c81fe7af7c3ffa299a6ae5fec7d43.zip | |
linux-user: fix 32bit g2h()/h2g()
sparc32plus has 64bit long type but only 32bit virtual address space. For instance, "apt-get upgrade" failed because of a mmap()/msync() sequence. mmap() returned 0xff252000 but msync() used g2h(0xffffffffff252000) to find the host address. The "(target_ulong)" in g2h() doesn't fix the address because it is 64bit long. This patch introduces an "abi_ptr" that is set to uint32_t if the virtual address space is addressed using 32bit in the linux-user case. It stays set to target_ulong with softmmu case. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20180814171217.14680-1-laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [lv: added "%" in TARGET_ABI_FMT_ptr "%"PRIx64]
Diffstat (limited to 'backends/hostmem-file.c')
0 files changed, 0 insertions, 0 deletions