WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] a quick question about _PAGE_GLOBAL flag in para virt mo

To: weiming <zephyr.zhao@xxxxxxxxx>
Subject: Re: [Xen-devel] a quick question about _PAGE_GLOBAL flag in para virt mode
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Sun, 15 Feb 2009 01:37:13 -0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 15 Feb 2009 01:37:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <add59a3f0902141740j58f0223eu4d04a169885b6f54@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <add59a3f0902141740j58f0223eu4d04a169885b6f54@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel