qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jindrich Makovicka <makovick@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: constant truncation warning in hw/pc.c for 32bit targets
Date: Sun, 28 Sep 2008 21:29:12 +0200	[thread overview]
Message-ID: <20080928212912.7a97f382@holly> (raw)
In-Reply-To: f43fc5580809280652o55a2dd3exdcb3fd9e2f06a8ba@mail.gmail.com

On Sun, 28 Sep 2008 16:52:22 +0300
"Blue Swirl" <blauwirbel@gmail.com> wrote:

> On 9/28/08, Jindrich Makovicka <makovick@gmail.com> wrote:
> > Hi,
> >
> >  for 32bit targets, the 0x100000000ULL start address of above-4G
> > memory is truncated to zero. IMO the code for above-4G allocation
> > could be #ifdef'ed only for 64 bit targets, as for 32bit it 1)
> > miscompiles and 2) won't be used anyway:
> 
> There are i386 systems with more than 4G of memory, so your patch is
> incorrect.

Yes, I know about PAE, but I assumed that when QEMU uses 32 bits for
a physical address (32bit guest on 32bit host) it will not support
more than 4 gigs.
 
> Now, if the code miscompiles there could be a problem somewhere else.

I meant that for a 32bit target, the physical address passed to
cpu_register_physical_memory will be zero instead of 4 gig as one
would expect because of the truncation.

I don't have a intimate knowledge of QEMU internals, but this warning
just looked a bit fishy to me :)

-- 
Jindrich Makovicka

      reply	other threads:[~2008-09-28 19:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-28 12:44 [Qemu-devel] constant truncation warning in hw/pc.c for 32bit targets Jindrich Makovicka
2008-09-28 13:52 ` Blue Swirl
2008-09-28 19:29   ` Jindrich Makovicka [this message]

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=20080928212912.7a97f382@holly \
    --to=makovick@gmail.com \
    --cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).