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] one question on __user_pgd

To: "leilei175@xxxxxxxxx" <leilei175@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] one question on __user_pgd
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Tue, 19 May 2009 13:39:49 -0700
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Tue, 19 May 2009 13:40:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <82fc30000905190717w709caf7bm3a41214dc2bdf831@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: <82fc30000905190717w709caf7bm3a41214dc2bdf831@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnYjLtGxizcMb3nTSu2OYLY3oaj6AAM7iMA
Thread-topic: [Xen-devel] one question on __user_pgd
On 5/19/2009 10:17:58 PM, leilei175@xxxxxxxxx wrote:
> in the mm_pin routine,
>             the function would do
>
>       mm_walk(mm, PAGE_KERNEL_RO);
>       xen_pgd_pin(__pa(mm->pgd)); /* kernel */
>       xen_pgd_pin(__pa(__user_pgd(mm->pgd))); /* user */
>       mm->context.pinned = 1;
>
> then I saw the macro __user_pgd is defined as
>
> #define __user_pgd(pgd) ((pgd) + PTRS_PER_PGD)
>
> my question is:
> what's the use of __user_pgd?

Since 64-bit Xen PV Linux runs in ring3, we use a pair of pgds to isolate the 
kernel address space. Please look at 
http://www.kernel.org/doc/ols/2006/ols2006v2-pages-181-192.pdf for the details, 
for example.

> moreover, concerning the action of "pin" the page directory table,
> what is the use of it?
>
> could some one shed some light on these questions? Any explanation is
> appreciated.
>
             .
Jun Nakajima | Intel Open Source Technology Center

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

<Prev in Thread] Current Thread [Next in Thread>