From mboxrd@z Thu Jan 1 00:00:00 1970 From: tgh Subject: Re: page table question! Date: Thu, 14 Jun 2007 16:44:55 +0800 Message-ID: <46710007.3030200@ncic.ac.cn> References: <907625E08839C4409CE5768403633E0B02561E10@sefsexmb1.amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <907625E08839C4409CE5768403633E0B02561E10@sefsexmb1.amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Petersson, Mats" Cc: xen-devel@lists.xensource.com, MT Rezaie List-Id: xen-devel@lists.xenproject.org hi I try to read the paging part code of xen-3.1.0, and I am confused about=20 the " compat_machine_to_phys_mapping" ,what does xen do with the=20 "CONFIG_COMPAT",and what are the differences between the=20 "machine_to_phys_mapping" and the "compat_machine_to_phys_mapping"? Could you help me Thanks in advance Petersson, Mats =E5=86=99=E9=81=93: > =20 > > =20 >> -----Original Message----- >> From: xen-devel-bounces@lists.xensource.com=20 >> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of MT Rezaie >> Sent: 13 June 2007 15:55 >> To: xen-devel@lists.xensource.com >> Subject: [Xen-devel] page table question! >> >> I want to know any difference between writing, reading and shadow page >> table (for example performance). >> =20 > > Not sure exactly what you're asking for: are you asking about "writable= " > and "non-writable" page-table vs. shadow-page-table? > > I believe "writable" page-table means that the guest is able to write > DIRECTLY to the lower level(s) of the page-table, and as such, we > "trust" the guest to do this correctly (and not map in stuff that > doesn't belong to the guest). I believe this mode isn't normally used b= y > Xen guests. This mode relies on the guest to correctly translate the > guest-physical address to a machine physical address.=20 > > Non-writable page-tables are mapped "read-only" throughout the entire > page-table, and when a write occurs, the page-table is updated via the > emulation of the instruction in the hypervisor. The hypervisor can chec= k > that the machine physical address is correct for the particular guest.=20 > > As of currently, Shadow-mode is only used for HVM (fully virtualized) > domains. In this case, the guest has a "dummy" page-table that is not > used by the processor for any memory accesses, instead a "shadow" (copy= ) > of the guest's page-table is used. The shadow page-table is used by the > processor. To make updates to the page-table appear in the > shadow-page-table, the hypervisor is making sure that the > guest-page-table is read-only, and when the guest writes to the > page-table, we reproduce the write [with modification to reflect the > difference between guest physical and machine physical address]. > > -- > Mats > > =20 >> I am thankful for any help or resource for that. >> >> --=20 >> Best Regards >> Mohamad Taghi Mir Mohamad Rezaie >> >> Iran University of Science and Technology >> Department of Computer Science & Engineering >> System Software Group >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> >> >> >> =20 > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > > . > > =20