From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzAra-0003wc-0p for qemu-devel@nongnu.org; Tue, 16 Jul 2013 15:24:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzArZ-0005dp-1T for qemu-devel@nongnu.org; Tue, 16 Jul 2013 15:24:41 -0400 Message-ID: <51E59DEE.5030603@redhat.com> Date: Tue, 16 Jul 2013 21:24:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <20130716181136.GD19826@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 , qemu-devel@nongnu.org, Gleb Natapov , qemu-stable@nongnu.org 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? > } else { > abort(); > } > if (supported_host_physical_size() < physical_size) { > abort(); > } > *eax |= physical_size; > > (Of course, the abort() calls should be replaced with proper error > reporting) This makes sense too. Though the best would be of course to use CPUID values coming from the real processors, and only using 40 for backwards compatibility. Paolo