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

[Xen-devel] Re: How to get guest PTEs info of a HVM with EPT

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: How to get guest PTEs info of a HVM with EPT
From: KennyChen <windtracekimo@xxxxxxxxxxxx>
Date: Tue, 8 Feb 2011 23:30:57 +0000 (UTC)
Delivery-date: Tue, 08 Feb 2011 15:31:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <loom.20110120T034614-798@xxxxxxxxxxxxxx> <20110120094437.GI8286@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Loom/3.14 (http://gmane.org/)
Tim Deegan <Tim.Deegan <at> citrix.com> writes:

> 
> At 02:50 +0000 on 20 Jan (1295491817), KennyChen wrote:
> > When EPT is enabled for a HVM guest, is that possible for hypervisor
> > to get the PTE information of guest page table? e.g, R/W, Supervisor
> > flags? 
> 
> Yes, of course - you know the guest's CR3 value and you can map all its
> memory so you can read its pagetables.  Look at hap_gva_to_gfn() and 
> how it calls guest_walk_tables().  You can even do it from userspace 
> in dom0 - see xc_translate_foreign_address().
> 
> What you can't do easily without shadow paging is _control_ the
> pagetable values.
> 
> Cheers,
> 
> Tim.
> 

Thanks for the hint, Tim, but I still got some questions.

When I put debug dump in the guest_walk_tables() to observe the l4e entry
(64-bit guest with 4GB ram, Centos 5.5), is it normal to get a l4e "10e21a067".
It seems the gfn 0x10e21a has exceeded the maximum physical memory of the guest
(0x100000 for 4GB). Is this a bug of the guest or some tricks in the l4e?

The other weird thing is gfn_to_mfn_unshare() called inside hap_gva_to_gfn().
Why is it necessary to unshare the page when we traverse the page table? we are
just reading it right?

Kenny




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

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