All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yury Usishchev <y.usishchev@samsung.com>
To: qemu-arm <qemu-arm@nongnu.org>
Subject: [Qemu-arm] AArch64 memory layout
Date: Thu, 23 Jun 2016 22:22:06 +0300	[thread overview]
Message-ID: <8760szvhgh.fsf@samsung.com> (raw)

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

                 reply	other threads:[~2016-06-23 20:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760szvhgh.fsf@samsung.com \
    --to=y.usishchev@samsung.com \
    --cc=qemu-arm@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.