|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] a quick question about _PAGE_GLOBAL flag in para virt mo
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
|
|
|
|
|