From: Peter Xu <peterx@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@mailo.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH] system: Define ram_addr_t to be always uint64_t
Date: Tue, 18 Aug 2026 11:28:14 -0400 [thread overview]
Message-ID: <aoR6Dtwq3XrxC3Uu@x1.local> (raw)
In-Reply-To: <CAFEAcA9xnJ1i541bLbKheVZkPvSFH1NTerUomWV4j4DyHhOPgg@mail.gmail.com>
On Fri, Aug 14, 2026 at 03:48:32PM +0100, Peter Maydell wrote:
> On Fri, 14 Aug 2026 at 14:41, Peter Xu <peterx@redhat.com> wrote:
> >
> > QEMU's 32bit host support was deprecated since 10.0 and removed in 11.0, at
> > least the system emulation part. Now it's safe to move ram_addr_t
> > completely over to uint64_t.
> >
> > It should be almost the same as uintptr_t as before for !Xen, except that
> > on some systems (like MacOS) uintptr_t and uint64_t can be typed slightly
> > differently, causing unnecessary compiler warnings when use them in a
> > mixture way.
> >
> > Hopefully, this change also makes it clear that ram_addr_t is never used as
> > a host pointer in any form, but only an internal QEMU integer based address
> > space for allocating ramblocks.
>
> I've thought for a while that we ought to do this even if we
> hadn't dropped 32-bit host support. Having ram_addr_t be
> 64-bit should work fine even on 32-bit hosts (as evidenced
> by the fact that we forced it that way when Xen was compiled
> in), it was just a performance thing to use 32-bit values here.
>
> Having it be 32-bit sometimes was always an irritating source
> of "whoops, doesn't compile on 32-bit hosts" bugs and other
> oddities. There are likely various places we can clean up now
> where we previously were working around this (e.g. in
> hw/arm/vexpress.c:a15_daughterboard_init()).
>
> There are also a few ifdefs on HOST_LONG_BITS == 32, which
> (where they're not relevant to the tools or guest-agent)
> I guess we could drop.
Indeed. Let me see whether I can touch those in one go.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2026-08-18 15:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 13:40 [PATCH] system: Define ram_addr_t to be always uint64_t Peter Xu
2026-08-14 14:26 ` Philippe Mathieu-Daudé
2026-08-18 15:31 ` Peter Xu
2026-08-14 14:48 ` Peter Maydell
2026-08-18 15:28 ` Peter Xu [this message]
2026-08-15 20:25 ` Richard Henderson
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=aoR6Dtwq3XrxC3Uu@x1.local \
--to=peterx@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@mailo.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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.