From: Wei Liu Subject: Re: [PATCH for-4.6] p2m/ept: Set the A bit only if PML is enabled Date: Thu, 24 Sep 2015 11:45:00 +0100 Message-ID: <20150924104500.GB29385@zion.uk.xensource.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> <5603DF7E02000078000A52D2@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5603DF7E02000078000A52D2@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 Cc: Kevin Tian , Wei Liu , George Dunlap , Andrew Cooper , Tim Deegan , xen-devel@lists.xen.org, Kai Huang , Ross Lagerwall , Jun Nakajima , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Thu, Sep 24, 2015 at 03:33:18AM -0600, Jan Beulich wrote: > >>> On 24.09.15 at 11:10, wrote: > > At 01:02 -0600 on 24 Sep (1443056566), Jan Beulich wrote: > >> --- a/xen/arch/x86/mm/p2m-ept.c > >> +++ b/xen/arch/x86/mm/p2m-ept.c > >> @@ -130,14 +130,18 @@ static void ept_p2m_type_to_flags(struct p2m_domain *p2m, ept_entry_t *entry, > >> break; > >> case p2m_ram_rw: > >> entry->r = entry->w = entry->x = 1; > >> - entry->a = entry->d = 1; > >> + entry->a = entry->d = cpu_has_ept_ad; > >> break; > >> case p2m_mmio_direct: > >> entry->r = entry->x = 1; > >> entry->w = !rangeset_contains_singleton(mmio_ro_ranges, > >> entry->mfn); > >> - entry->a = 1; > >> - entry->d = entry->w; > >> + entry->a = cpu_has_ept_ad; > >> + entry->d = entry->w && cpu_has_ept_ad; > >> break; > >> case p2m_ram_logdirty: > >> entry->r = entry->x = 1; > >> > > > > Sure, that works. I still prefer putting the workaround on the CR3 > > operation, so all the cost happens on the broken chip, but I'll shut > > up about that now. :) > > And I agree to that for post-4.6. For 4.6 the easier to validate > fix still would seem to be a variation of what Ross posted. > I just finished this thread. Looks like HV maintainers have devised a plan for this issue. Thank you all. Wei. > Jan