Received: from eggs.gnu.org ([2001:4830:134:3::10]:44280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMgAS-0006eu-Qp for qemu-devel@nongnu.org; Mon, 11 Jul 2016 14:42:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMgAO-0000WC-92 for qemu-devel@nongnu.org; Mon, 11 Jul 2016 14:42:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMgAO-0000W7-3O for qemu-devel@nongnu.org; Mon, 11 Jul 2016 14:42:52 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 804B8C05B1D7 for ; Mon, 11 Jul 2016 18:42:51 +0000 (UTC) Date: Mon, 11 Jul 2016 15:42:49 -0300 From: Eduardo Habkost Message-ID: <20160711184249.GW4131@thinpad.lan.raisama.net> References: <1467990099-27853-1-git-send-email-dgilbert@redhat.com> <1467990099-27853-6-git-send-email-dgilbert@redhat.com> <20160708231601.GR4131@thinpad.lan.raisama.net> <20160711153921.GD2078@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160711153921.GD2078@work-vm> Subject: Re: [Qemu-devel] [PATCH v4 5/5] x86: Set physical address bits based on host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, marcel@redhat.com, mst@redhat.com, kraxel@redhat.com On Mon, Jul 11, 2016 at 04:39:22PM +0100, Dr. David Alan Gilbert wrote: > * Eduardo Habkost (ehabkost@redhat.com) wrote: [...] > > > + cpu->phys_bits = TCG_PHYS_ADDR_BITS; > > > + } > > > } else { > > > /* For 32 bit systems don't use the user set value, but keep > > > * phys_bits consistent with what we tell the guest. > > > > Shouldn't we return error if host-phys-bits is set in 32-bit > > mode? > > I've just realised there's a reason that erroring in this case is a problem. > Imagine a future (or downstream) machine type that made host-phys-bits the default; > how would it run with a 32bit CPU? Oh, that's right. Ignoring it when explicitly set isn't intuitive, but we need to be able to ignore it when set by a machine compat_props (or if it's enabled by default). And creating two separate properties sounds like overkill... I'm reluctant, but I think it's OK to ignore it if LM is not set. But we need to make sure it's documented somewhere. -- Eduardo