Received: from eggs.gnu.org ([2001:4830:134:3::10]:44666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvgO-0003wx-KP for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:27:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDvgJ-0001hp-JJ for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:27:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvgJ-0001hl-Dm for qemu-devel@nongnu.org; Fri, 17 Jun 2016 11:27:39 -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 04758C04B31C for ; Fri, 17 Jun 2016 15:27:39 +0000 (UTC) Date: Fri, 17 Jun 2016 12:27:37 -0300 From: Eduardo Habkost Message-ID: <20160617152737.GF18662@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <484c4d48-7e41-5034-52ba-d5de4d161698@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 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). -- Eduardo