Received: from eggs.gnu.org ([2001:4830:134:3::10]:49294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDtAf-0002Ev-HK for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:46:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDtAb-000274-By for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:46:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDtAb-00026w-6C for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:46:45 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 4C48CC04B30C for ; Fri, 17 Jun 2016 12:46:43 +0000 (UTC) Date: Fri, 17 Jun 2016 09:46:41 -0300 From: Eduardo Habkost Message-ID: <20160617124641.GZ18662@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 09:47:27AM +0200, Paolo Bonzini wrote: > On 16/06/2016 22:14, Eduardo Habkost wrote: > > This is necessary only when phys_bits is higher on the > > destination, right? > > > > Should we really default this to true? I would like to enable > > this hack only when really necessary. Except when using host's > > phys_bits (phys-bits=0), is there any valid reason to expect > > higher phys-bits on the destination? > > It would need a property even if you did it only for phys-bits==0, and > then it's simpler to just do it always. > > The bits are reserved anyway, so we can do whatever we want with them. > In fact I think it's weird for the architecture to make them > must-be-zero, it might even make more sense to make them must-be-one... > It's a mask after all, and there's no way to access out-of-range > physical addresses. If we always fill the bits on the source, the destination can't differentiate between a 40-bit source that set the MTRR to 0xffffffffff from a 36-bit source that set the MTRR to 0xfffffffff. I really want to print a warning if the MTRR value or the phys-bits value is being changed during migration, just in case this has unintended consequences in the future. We can send the current phys_bits value in the migration stream, so the destination can decide how to handle it (and which warnings to print). -- Eduardo