From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzTVu-0006Lt-1D for qemu-devel@nongnu.org; Wed, 17 Jul 2013 11:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzTVs-0004yh-6I for qemu-devel@nongnu.org; Wed, 17 Jul 2013 11:19:33 -0400 Date: Wed, 17 Jul 2013 18:19:28 +0300 From: Gleb Natapov Message-ID: <20130717151928.GF13732@redhat.com> References: <1373995321-2470-1-git-send-email-aarcange@redhat.com> <20130716173844.GC19826@otherpad.lan.raisama.net> <51E586E6.1060001@redhat.com> <20130716181136.GD19826@otherpad.lan.raisama.net> <51E59DEE.5030603@redhat.com> <20130716194238.GG11420@otherpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130716194238.GG11420@otherpad.lan.raisama.net> Subject: Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Andrea Arcangeli , Paolo Bonzini , qemu-devel@nongnu.org, qemu-stable@nongnu.org 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.