From: Tim Deegan Subject: Re: [PATCH for-4.6] p2m/ept: Set the A bit only if PML is enabled Date: Thu, 24 Sep 2015 10:20:53 +0100 Message-ID: <20150924092053.GC63393@deinos.phlegethon.org> References: <1442393271-12388-1-git-send-email-ross.lagerwall@citrix.com> <20150923151846.GA9208@zion.uk.xensource.com> <20150923154629.GA61801@deinos.phlegethon.org> <5603BC3602000078000A5173@prv-mh.provo.novell.com> <20150924091003.GA63393@deinos.phlegethon.org> <5603BEB7.1030103@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5603BEB7.1030103@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Kevin Tian , Wei Liu , Jan Beulich , George Dunlap , xen-devel@lists.xen.org, Kai Huang , Ross Lagerwall , Jun Nakajima , Keir Fraser List-Id: xen-devel@lists.xenproject.org At 10:13 +0100 on 24 Sep (1443089607), Andrew Cooper wrote: > > >> etc along with adjusting the existing gating of PML on AD being > >> available (perhaps by simply stripping the respective bit from what > >> we read from MSR_IA32_VMX_EPT_VPID_CAP). Of course this > >> then ignores the fact that the erratum only affects the A bit, but > >> I think we can live with that. > >> > >> I also think the currently slightly strange setting of the ept_ad bit > >> should be changed: There's no point setting the bit for domains > >> not getting PML enabled (and incurring the overhead of the > >> hardware updating the bits); imo this should instead be done in > >> ept_enable_pml() / vmx_domain_enable_pml() (and undone in > >> the respective disable function). > > Yep. > > Just as a note, in the non PML case, the AD enable bit in EPTP is left > clear, which means that the A/D bits in the EPTs have no effect. I assumed the enable bit was what we were talking about -- the actual A/D bits in EPTEs should always be _set_ to avoid extra faults. So that sounds like we're already doing the right thing. Cheers, Tim.