qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: constant truncation warning in hw/pc.c for 32bit target


From: Jindrich Makovicka
Subject: [Qemu-devel] Re: constant truncation warning in hw/pc.c for 32bit targets
Date: Sun, 28 Sep 2008 21:29:12 +0200

On Sun, 28 Sep 2008 16:52:22 +0300
"Blue Swirl" <address@hidden> wrote:

> On 9/28/08, Jindrich Makovicka <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]