Received: from eggs.gnu.org ([2001:4830:134:3::10]:46284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvnb-0003B5-3c for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:35:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDvnW-0003Qb-3M for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:35:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvnV-0003QE-U0 for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:35:06 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 6F235693F8 for ; Fri, 17 Jun 2016 15:35:05 +0000 (UTC) Date: Fri, 17 Jun 2016 12:35:03 -0300 From: Eduardo Habkost Message-ID: <20160617153503.GG18662@thinpad.lan.raisama.net> References: <1466097133-5489-1-git-send-email-dgilbert@redhat.com> <1466097133-5489-4-git-send-email-dgilbert@redhat.com> <20160616201408.GX18662@thinpad.lan.raisama.net> <20160617124641.GZ18662@thinpad.lan.raisama.net> <4371f52c-335b-95dd-0a50-432d876f0784@redhat.com> <20160617134120.GB18662@thinpad.lan.raisama.net> <484c4d48-7e41-5034-52ba-d5de4d161698@redhat.com> <20160617152737.GF18662@thinpad.lan.raisama.net> <1cd87a42-62d5-4d76-7dda-08a8662cc8c1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1cd87a42-62d5-4d76-7dda-08a8662cc8c1@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/5] x86: fill high bits of mtrr mask List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "Dr. David Alan Gilbert (git)" , aarcange@redhat.com, qemu-devel@nongnu.org On Fri, Jun 17, 2016 at 05:29:21PM +0200, Paolo Bonzini wrote: > > > On 17/06/2016 17:27, Eduardo Habkost wrote: > > On Fri, Jun 17, 2016 at 04:25:57PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 17/06/2016 15:41, Eduardo Habkost wrote: > >>> In theory, we should never initialize anything on the machine > >>> based on the host we are running. In practice we sometimes do > >>> that, and we know it's unsafe. Sending the value on the migration > >>> stream is a solution to detect when this breaks something. We did > >>> that before, for TSC frequency. > >>> > >>> I prefer to add a little extra code, than to waste time debugging > >>> when that stuff breaks. > >> > >> Fair enough (but still let's add and strip the 1s in pre_save and > >> post_load). It is a good justification for sending configuration over > >> the wire, that we initialize things based on the host we're running. > >> > >> But we shouldn't initialize more things based on the host (e.g. new > >> booleans should be "enforce"-style). > > > > Strongly agreed. > > > >> Also I don't really like > >> introducing sanity checks for those that aren't based on the host (as in > >> the LMCE thread). This code will never trigger in practice, so it's > >> just extra cost for no benefit. > > > > Our experience with guest ABI and compatibility code tells me > > otherwise. Keeping guest ABI is hard, so I would always support > > adding extra code to help us catch mistakes (either in QEMU, > > management software, or user mistakes). > > I agree, but I think the "enforce"-style properties are enough (and > count as extra code :)). I agree they are enough when bits have an easy 1-1 correspondence to command-line options. I was thinking about things like CPUID bits, that depend on complex CPU model + accelerator + machine-type interactions. -- Eduardo