From: Zwane Mwaikambo Subject: Re: [PATCH 4/4] kvm: bios: switch MTRRs to cover only the PCI range and default to WB Date: Sat, 27 Sep 2008 06:55:33 -0700 (PDT) Message-ID: References: <1222365149.8138.266.camel@2710p.home> <200809271335.10166.sheng.yang@intel.com> <48DE36C1.4070700@redhat.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: "Yang, Sheng" , kvm@vger.kernel.org, Alex Williamson To: Avi Kivity Return-path: Received: from idcmail-mo1so.shaw.ca ([24.71.223.10]:54022 "EHLO idcmail-mo1so.shaw.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbYI0Nzp (ORCPT ); Sat, 27 Sep 2008 09:55:45 -0400 In-Reply-To: <48DE36C1.4070700@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, 27 Sep 2008, Avi Kivity wrote: > Yang, Sheng wrote: > > I think we should do a little more than just write msr to update mtrr. > > > > Intel SDM 10.11.8 "MTRR consideration in MP Systems" define the procedure to > > modify MTRR msr in MP. Especially, step 4 enter no-fill cache mode(set > > CR0.CD bit and clean NW bit), step 12 re-enabled the caching(clear this two > > bits). > > > > We based on these behaviors to detect MTRR update. > > > > > > Why not simply flush the mmu on an mtrr write? > > (though of course I have no objection to doing what the manual says) Detecting that condition is fine for operating systems which follow it, but some don't, including older Linux kernels :( Flushing on MTRR write, although being overzealous would be the most robust. Zwane