From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Levon Subject: Re: a quick question about _PAGE_GLOBAL flag in para virt mode Date: Sun, 15 Feb 2009 18:06:32 -0500 Message-ID: <20090215230632.GA20434@movementarian.org> References: <4997E249.1050407@goop.org> <49989685.6020004@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <49989685.6020004@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: weiming , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Sun, Feb 15, 2009 at 02:26:13PM -0800, Jeremy Fitzhardinge wrote: > >why not set global bit for user kernel pages? I guess this is because > >when domain switchs, all tlb entries will still be flushed, so it's > >not necessary for user kernel pages. Is my understanding right? > > 64-bit Xen uses paging to protect the guest kernel from guest usermode, > and protect Xen from the guest kernel, and as a result has to do a cr3 > reload for any user->kernel switch (which is why it has to go via Xen). > We don't want kernel mappings to be visible to usermode, so they have to > only be in tlb while we're actually running in guest kernel mode; And here's a real example of what happens when you don't get this right: http://blogs.sun.com/levon/entry/xen_compatibility_with_solaris regards john