Received: from eggs.gnu.org ([2001:4830:134:3::10]:45037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvi7-00067p-BQ for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:29:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDvi2-00020U-AY for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:29:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvi2-00020O-40 for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:29:26 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 A0CE0800A8 for ; Fri, 17 Jun 2016 15:29:25 +0000 (UTC) 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> From: Paolo Bonzini Message-ID: <1cd87a42-62d5-4d76-7dda-08a8662cc8c1@redhat.com> Date: Fri, 17 Jun 2016 17:29:21 +0200 MIME-Version: 1.0 In-Reply-To: <20160617152737.GF18662@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Eduardo Habkost Cc: "Dr. David Alan Gilbert (git)" , aarcange@redhat.com, qemu-devel@nongnu.org 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 :)). Paolo