All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Riku Voipio <riku.voipio@iki.fi>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 2/2] linux-user: fix 32bit g2h()/h2g()
Date: Fri, 10 Aug 2018 12:30:50 -0700	[thread overview]
Message-ID: <c000bae3-1986-1062-0dbc-a8d2feb0820e@linaro.org> (raw)
In-Reply-To: <20180810185321.20017-2-laurent@vivier.eu>

On 08/10/2018 11:53 AM, Laurent Vivier wrote:
> 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 a "target_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.

I would prefer the name "abi_ptr", since the full 64-bits of target_ulong are
still used for any actual dereferences.


r~

  reply	other threads:[~2018-08-10 19:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10 18:53 [Qemu-devel] [PATCH 1/2] linux-user: cleanup msync output in strace Laurent Vivier
2018-08-10 18:53 ` [Qemu-devel] [PATCH 2/2] linux-user: fix 32bit g2h()/h2g() Laurent Vivier
2018-08-10 19:30   ` Richard Henderson [this message]
2018-08-10 19:40     ` Laurent Vivier
2018-08-10 19:28 ` [Qemu-devel] [PATCH 1/2] linux-user: cleanup msync output in strace Richard Henderson
2018-08-10 19:43   ` Laurent Vivier

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=c000bae3-1986-1062-0dbc-a8d2feb0820e@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=crosthwaite.peter@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    /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.