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: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] a quick question about _PAGE_GLOBAL flag in para virt mode
From: weiming <zephyr.zhao@xxxxxxxxx>
Date: Sun, 15 Feb 2009 12:30:55 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 15 Feb 2009 09:31:20 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=lchJW6/ws3NdmT3bt/88cEkty7yTJosmy9cBYTF0UZ4=; b=RaRLF7+TKCxS0CYupmmfKzZyfDPOyl1TCGWAuJcUEbEYw4Ahx92rPvp1WXOe0NaC6/ cTRuWNllA3HPKEko6lTZcbXVYnVuxB71dWChsHTsDSGci03KWizix0+J8JGKfHlyE4Tq NRgnUM+Q4wgOzZDVZF3kMdaD7qW5IHj9Rp+Gk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=RmKyphrqL27X9Z2NxFVpuDQ9/iwl0JnrXU+VPWiDLxNYzyp65b1LKwxeksCRcJWYhs GQv524l38C/6lov3Q/W+LNFq/UoYFeCUeOjCzk3h3iNOI2ez9KSGHvfyAyeeBYWfwZ1R i2G7go/eLY8SBiwLfr3FfvTBIQP6EJaK6Mx/g=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4997E249.1050407@xxxxxxxx>
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> <4997E249.1050407@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks, Jeremy

When a normal context switch happens (like process switch), those tlb entries will still be flushed no matter if global bit is set or not, is it correct?

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?

Thanks
Weiming




On Sun, Feb 15, 2009 at 4:37 AM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
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