All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: weiming <zephyr.zhao@gmail.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: a quick question about _PAGE_GLOBAL flag in para virt	mode
Date: Sun, 15 Feb 2009 01:37:13 -0800	[thread overview]
Message-ID: <4997E249.1050407@goop.org> (raw)
In-Reply-To: <add59a3f0902141740j58f0223eu4d04a169885b6f54@mail.gmail.com>

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

  reply	other threads:[~2009-02-15  9:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15  1:40 a quick question about _PAGE_GLOBAL flag in para virt mode weiming
2009-02-15  9:37 ` Jeremy Fitzhardinge [this message]
2009-02-15 17:30   ` weiming
2009-02-15 22:26     ` Jeremy Fitzhardinge
2009-02-15 23:06       ` John Levon
2009-02-16  0:47       ` weiming
2009-02-16  2:35         ` How to disconnect a network card in the Virtual machine? ANNIE LI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4997E249.1050407@goop.org \
    --to=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=zephyr.zhao@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.