From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDsev-0000Yv-Lp for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDseq-0002OB-L0 for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:14:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDseq-0002O6-FY for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:13:56 -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 29B0D8F262 for ; Fri, 17 Jun 2016 12:13:56 +0000 (UTC) References: <1466097133-5489-1-git-send-email-dgilbert@redhat.com> <1466097133-5489-3-git-send-email-dgilbert@redhat.com> <20160616195953.GW18662@thinpad.lan.raisama.net> From: Paolo Bonzini Message-ID: <50f97a2f-64bd-7122-60d8-90bda91ca540@redhat.com> Date: Fri, 17 Jun 2016 14:13:50 +0200 MIME-Version: 1.0 In-Reply-To: <20160616195953.GW18662@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/5] x86: Mask mtrr mask based on CPU physical address limits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , "Dr. David Alan Gilbert (git)" Cc: qemu-devel@nongnu.org, aarcange@redhat.com On 16/06/2016 21:59, Eduardo Habkost wrote: > > + /* The CPU GPs if we write to a bit above the physical limit of > > + * the host CPU (and KVM emulates that) > > + */ > > + uint64_t mask = env->mtrr_var[i].mask; > > + mask &= phys_mask; > > + > > We are silently changing the MSR value seen by the guest, should > we print a warning in case mask != env->mtrr_var[i].mask? You're right. post_load is probably a better place to remove these bits (and to fail if they are not all ones). Paolo