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

[Xen-devel] one question on __user_pgd

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] one question on __user_pgd
From: leilei175@xxxxxxxxx
Date: Tue, 19 May 2009 22:17:58 +0800
Delivery-date: Tue, 19 May 2009 07:19:02 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=1r0rD5XhYHev2tryeQjXfI85wYvnFXQKAJYBgYIxC74=; b=rtFoDS4NkPwMA2shs4YwprMIxsVwArf05BH11CsFz8KdfU2oNU4AJ/GLGkluea+Olq hWWbt97u/Jo/XG+qiIN4HXhe2LyXd9O76E+VYzIRhs6l0Chzh+ZzakQ3Sjnc4U5S7y9e 37SxvQCdLz86tof/rWvDQFELWHXljpjYkhWDc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=oCvaRefgNGii3rIN8xjz+uFrllhIZ/xYlCw1+aScBp62ehQS0AfpnlatDUQr8x80ID PfTjqCxO+v1algpag+/6PzzkP/btdIpuualvfHagRkw8VgDiZP2MZKbpjns/duq+Lf4d UXQmwPa8kp+vNtcfKPbP9DHIHJ31EWgY8t8Qc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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?
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.

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

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