From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCHv2 for-4.6] p2m/ept: Work around hardware errata setting A bit Date: Mon, 28 Sep 2015 17:50:39 +0100 Message-ID: <56096FDF.8020306@citrix.com> References: <1443443974-17109-1-git-send-email-ross.lagerwall@citrix.com> <5609664902000078000A637C@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5609664902000078000A637C@prv-mh.provo.novell.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: Jan Beulich , Ross Lagerwall Cc: tim@xen.org, Kevin Tian , Wei Liu , George Dunlap , Andrew Cooper , Eddie Dong , xen-devel@lists.xen.org, Jun Nakajima , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 28/09/15 15:09, Jan Beulich wrote: >>>> On 28.09.15 at 14:39, wrote: >> --- a/xen/arch/x86/mm/p2m-ept.c >> +++ b/xen/arch/x86/mm/p2m-ept.c >> @@ -34,6 +34,8 @@ >> >> #include "mm-locks.h" >> >> +static bool_t __read_mostly cpu_has_ept_ad; > > This should be > #define cpu_has_ept_ad (vmx_ept_vpid_cap & VMX_EPT_AD_BIT) > put next to the respective other ones in vmx.h. > >> @@ -1150,6 +1152,9 @@ int ept_p2m_init(struct p2m_domain *p2m) >> p2m->memory_type_changed = ept_memory_type_changed; >> p2m->audit_p2m = NULL; >> >> + /* Work around Errata AVR41 on Avaton processors. */ >> + cpu_has_ept_ad = boot_cpu_data.x86_model != 0x4d; > > And this one then should turn off said flag (i.e. needs to be moved > elsewhere). > > Plus PML initialization should get a respective check added. In case there was any doubt, I am following this thread, and so far haven't had anything to disagree with the direction Tim and Jan are suggesting. -George