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] Questions on EPT dump and creation

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Questions on EPT dump and creation
From: YAO <yffbrave@xxxxxxxxx>
Date: Mon, 18 Jul 2011 21:57:24 +0800
Delivery-date: Mon, 18 Jul 2011 07:14:32 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=0r43duIE7N3Q8s9bt2eYY68ev9CSlmNflOwr61gKPsE=; b=oNI8tP7N+oR21Xiw0tNkw/0pVG9sPMAbWQW95a398Y23t+SzMez5ONS82ZH4ny0stm e9Hjv9DLftJrSY3qwSla1U9Wm5vZ+arpmRzqF7jL6K6qPLE/IR6k5W+Uds3jNvzgUjHd NIPla09s2ciEDdcPupXiDkaE2vK8zmmCa0PcY=
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
First, I used "xm debug-key D" to dump ept mappings. But I have a doubt about the mapping.
I started a 32bit HVM which memory is 512, so the max gfn should be 0x1ffff. But the result of "xm dmesg" showed gfn->mfn mapping until 0xfffff.
Output looked like below:
(XEN) gfn: fc012  mfn: 179e6
(XEN) gfn: fc013  mfn: 179e5
(XEN) gfn: fee00  mfn: 2e8
(XEN) gfn: feffb  mfn: 178fd
(XEN) gfn: feffc  mfn: 178fc
(XEN) gfn: feffd  mfn: 178fb
(XEN) gfn: feffe  mfn: 178fa
(XEN) gfn: fefff  mfn: 178f9
(XEN) gfn: fffff  mfn: 2eb

What I think is every HVM has one EPT table and the table maps the allocated memory like from 0 to 0x1ffff, why does the HVM ept map all the 4G space?
Isn't it unneccessary and waste of memory?

Second, I want to copy the system ept and used the copy for later translation. Since the HVM is 512M, so I need one PML4 pointed by eptp, one PDP pointed by PML4 entry[0], one PD pointed by PDP entry[0], 512 PT's pointed by all PD entries. After all settings are done, I'v got gfn->mfn mapping of 1G memory. I think it should be working, but not. Where am I wrong? What would I pay attention to?

Looking forward to your help,
Yao

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