From: "Travis Johnson" Subject: Guest page table dumping Date: Fri, 16 Mar 2007 14:46:25 -0400 Message-ID: <70c43c5f0703161146w9e00f2fm2b119d20ed90cc8@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1864667948==" 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 --===============1864667948== Content-Type: multipart/alternative; boundary="----=_Part_91581_31235808.1174070785378" ------=_Part_91581_31235808.1174070785378 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello List, I'm trying to get at the guest's (x86_64 VMX HVM guest, x86_64 Xen 3.0.4-1) view of the page tables and dump them out so I can read them offline. My strategy to do this is to add a domctl I can use to map the domain page that corresponds to the guest's page table page (for right now just the top level page table, PML4) then dump out that page to dom0 so I can process it. I've got the skeleton domctl working but the trouble is I don't know exactly how I should transform the guests view of the CR3 address in order for map_domain_page() to be happy. What transformation should I use to get vmx.cpu_cr3 into a happy address for use with map_domain_page(). My best guess so far is map_domain_page(gmfn_to_mfn(d, v->arch.hvm_cpu.u.vmx.cpu_cr3 >> PAGE_SHIFT)), is that in the ballpark? Is cpu_cr3 the correct cr3 to use to get at the level 4 guest page table? Would it be easier to dump the shadow representation of the l4 page table? TIA, -Travis ------=_Part_91581_31235808.1174070785378 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello List,

I'm trying to get at the guest's (x86_64 VMX HVM guest, x86_64 Xen 3.0.4-1) view of the page tables and dump them out so I can read them offline. My strategy to do this is to add a domctl I can use to map the domain page that corresponds to the guest's page table page (for right now just the top level page table, PML4) then dump out that page to dom0 so I can process it. I've got the skeleton domctl working but the trouble is I don't know exactly how I should transform the guests view of the CR3 address in order for map_domain_page() to be happy.

What transformation should I use to get vmx.cpu_cr3 into a happy address for use with map_domain_page(). My best guess so far is map_domain_page(gmfn_to_mfn(d, v->arch.hvm_cpu.u.vmx.cpu_cr3 >> PAGE_SHIFT)), is that in the ballpark?

Is cpu_cr3 the correct cr3 to use to get at the level 4 guest page table?

Would it be easier to dump the shadow representation of the l4 page table?

TIA,
-Travis ------=_Part_91581_31235808.1174070785378-- --===============1864667948== 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 --===============1864667948==--