WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Guest page table dumping

To: Travis Johnson <travis.jo@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Guest page table dumping
From: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Date: Mon, 19 Mar 2007 10:04:49 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 19 Mar 2007 03:03:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <70c43c5f0703161146w9e00f2fm2b119d20ed90cc8@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <70c43c5f0703161146w9e00f2fm2b119d20ed90cc8@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
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 <Tim.Deegan@xxxxxxxxxxxxx>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>