From: Tim Deegan Subject: Re: [PATCH] x86/HAP: also flush TLB when altering a present 1G entry Date: Sun, 13 Apr 2014 23:17:12 +0200 Message-ID: <20140413211712.GF99209@deinos.phlegethon.org> References: <5347E0300200007800007ED0@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WZRm7-0000ti-GH for xen-devel@lists.xenproject.org; Sun, 13 Apr 2014 21:17:15 +0000 Content-Disposition: inline In-Reply-To: <5347E0300200007800007ED0@nat28.tlf.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: xen-devel List-Id: xen-devel@lists.xenproject.org At 11:29 +0100 on 11 Apr (1397212176), Jan Beulich wrote: > I actually wonder whether it is really correct to avoid the flush when > updating intermediate page table entries. It certainly used to be; now that we have, e.g. p2m_free_entry() it would be best to flush whenever (old_flags & _PAGE_PRESENT). Tim. > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/mm/hap/hap.c > +++ b/xen/arch/x86/mm/hap/hap.c > @@ -712,7 +712,7 @@ hap_write_p2m_entry(struct vcpu *v, unsi > > safe_write_pte(p, new); > if ( (old_flags & _PAGE_PRESENT) > - && (level == 1 || (level == 2 && (old_flags & _PAGE_PSE))) ) > + && (level == 1 || (old_flags & _PAGE_PSE)) ) > flush_tlb_mask(d->domain_dirty_cpumask); > > paging_unlock(d); > > > > x86/HAP: also flush TLB when altering a present 1G entry > > I actually wonder whether it is really correct to avoid the flush when > updating intermediate page table entries. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/mm/hap/hap.c > +++ b/xen/arch/x86/mm/hap/hap.c > @@ -712,7 +712,7 @@ hap_write_p2m_entry(struct vcpu *v, unsi > > safe_write_pte(p, new); > if ( (old_flags & _PAGE_PRESENT) > - && (level == 1 || (level == 2 && (old_flags & _PAGE_PSE))) ) > + && (level == 1 || (old_flags & _PAGE_PSE)) ) > flush_tlb_mask(d->domain_dirty_cpumask); > > paging_unlock(d);