From: Jeremy Fitzhardinge Subject: Re: a quick question about _PAGE_GLOBAL flag in para virt mode Date: Sun, 15 Feb 2009 01:37:13 -0800 Message-ID: <4997E249.1050407@goop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: weiming Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org weiming wrote: > Hi, > > I noticed that in adjust_guest_l1e() in arch/x86/mm.c, _PAGE_GLOBAL > flag is set for guest's non-kernel pages. Meanwhile, > _PAGE_GUEST_KERNEL page cannot have the Global bit set. > > What's the purpose of setting Global bit for guest's user pages? > AFAIK, when the Global bit is set, it prevents those entries be > flushed from TLB. So it makes more sense to set it for guest's kernel > pages. In 64-bit, syscalls must go via Xen, which entails a cr3 reload. This would normally flush the tlb, but since the usermode pages are global, they remain in the tlb during the user->xen->kernel->xen->user transition. J