From: weiming Subject: can xc_translate_foreign_address() always work for kernel va under x86_64 PV? Date: Thu, 20 Mar 2008 08:20:16 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1526358588==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============1526358588== Content-Type: multipart/alternative; boundary="----=_Part_2552_1341771.1206015616199" ------=_Part_2552_1341771.1206015616199 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, In xc_translate_foreign_address(), the page directory address comes from vcpu's cr3. when the domains is running a user application, the cr3 should contain the app's page table. Under x86_64 PV, kernel and user space are both under ring 3 and protection is implemented via page protection, which means app's page table has no kernel space mappings. So my question is: given a kernel's virtual address, can this function always return a valid mfn? Thanks, Weiming ------=_Part_2552_1341771.1206015616199 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,
In xc_translate_foreign_address(), the page directory address comes from vcpu's cr3.

when the domains is running a user application, the cr3 should contain the app's page table.

Under x86_64 PV, kernel and user space are both under ring 3 and protection is implemented via page protection, which means app's page table has no kernel space mappings.

So my question is: given a kernel's virtual address, can this function always return a valid mfn?

Thanks,
Weiming
------=_Part_2552_1341771.1206015616199-- --===============1526358588== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1526358588==--