On Tue, Jul 16, 2013 at 04:42:38PM -0300, Eduardo Habkost wrote: > On Tue, Jul 16, 2013 at 09:24:30PM +0200, Paolo Bonzini wrote: > > Il 16/07/2013 20:11, Eduardo Habkost ha scritto: > > > For physical bit size, what about extending it in a backwards-compatible > > > way? Something like this: > > > > > > *eax = 0x0003000; /* 48 bits virtual */ > > > if (ram_size < 1TB) { > > > physical_size = 40; /* Keeping backwards compatibility */ > > > } else if (ram_size < 4TB) { > > > physical_size = 42; > > > > Why not go straight up to 44? > > I simply trusted the comment saying: "The physical address space is > limited to 42 bits in exec.c", and assumed we had a 42-bit limit > somewhere else. > > We could also try something like this: > > if (ram_size < 1TB) { > physical_size = 40; /* Keeping backwards compatibility */ > } else { > physical_size = msb(ram_size); > } > if (supported_host_physical_size() < physical_size) { > abort(); > } > > ram_size is the things we set with -m, right? Because if it is then using it here is incorrect since, due to PCI hole, max phys address is higher than ram_size.
-- Gleb.