From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH for-4.6] p2m/ept: Set the A bit only if PML is enabled Date: Thu, 24 Sep 2015 10:13:27 +0100 Message-ID: <5603BEB7.1030103@citrix.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150924091003.GA63393@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan , Jan Beulich Cc: Kevin Tian , Wei Liu , George Dunlap , xen-devel@lists.xen.org, Kai Huang , Ross Lagerwall , Jun Nakajima , Keir Fraser List-Id: xen-devel@lists.xenproject.org >> 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. Therefore, despite the unconditional setting of the A/D bits, there is still no MMU overhead. ~Andrew