[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] one question on __user_pgd


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: leilei175@xxxxxxxxx
  • Date: Tue, 19 May 2009 22:17:58 +0800
  • Delivery-date: Tue, 19 May 2009 07:19:02 -0700
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.