All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-arm] AArch64 memory layout
@ 2016-06-23 19:22 Yury Usishchev
  0 siblings, 0 replies; only message in thread
From: Yury Usishchev @ 2016-06-23 19:22 UTC (permalink / raw)
  To: qemu-arm

Hello!

I found that address space for AArch64 is considered to be 64bit:

target-arm/cpu.h:1776:
#if defined(TARGET_AARCH64)
#  define TARGET_PHYS_ADDR_SPACE_BITS 48
#  define TARGET_VIRT_ADDR_SPACE_BITS 64
#else
#  define TARGET_PHYS_ADDR_SPACE_BITS 40
#  define TARGET_VIRT_ADDR_SPACE_BITS 32
#endif

But from kernel side it is either 39 or 42 or 48 bit:
https://www.kernel.org/doc/Documentation/arm64/memory.txt

This causes problems with address sanitizer usage under qemu. ASAN under qemu detects address space as 39 bits. When
host mmap returns value over 1<<39 (this can happen on x86_64) ASAN causes segmentation fault.

If TARGET_VIRT_ADDR_SPACE_BITS is changed to 39, runtime checks prevents mapping from bigger addresses and everything is
fine. But this is not a correct solution as mappings can be also 42 or 48.

So the question is should TARGET_VIRT_ADDR_SPACE_BITS be changed and how?

BR,
Yury Usishchev

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-23 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23 19:22 [Qemu-arm] AArch64 memory layout Yury Usishchev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.