From: Tim Deegan Subject: Re: Guest page table dumping Date: Mon, 19 Mar 2007 10:04:49 +0000 Message-ID: <20070319100449.GD32000@york.uk.xensource.com> References: <70c43c5f0703161146w9e00f2fm2b119d20ed90cc8@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: <70c43c5f0703161146w9e00f2fm2b119d20ed90cc8@mail.gmail.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: Travis Johnson Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi Travis, At 14:46 -0400 on 16 Mar (1174056385), Travis Johnson wrote: > 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. Have a read through sh_update_cr3(); near the top it calls hvm_get_guest_ctrl_reg(v, 3) to read the guest's CR3 and translates it to a guest frame-number and then to a machine frame-number (suitable for map_domain_page()) > Is cpu_cr3 the correct cr3 to use to get at the level 4 guest page table? Yes, though calling hvm_get_guest_ctrl_reg() would be cleaner. > Would it be easier to dump the shadow representation of the l4 page table? You can get that at v->arch.shadow_table[0] for 64bit guests. There's also some code in svm.c for dumping page tables, but it may have bit-rotted. Cheers, Tim. -- Tim Deegan , XenSource UK Limited Registered office c/o EC2Y 5EB, UK; company number 05334508