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] Xen EPT modifications and interceptions

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Xen EPT modifications and interceptions
From: ken mark <ken.mingyuan@xxxxxxxxx>
Date: Wed, 3 Feb 2010 11:00:46 +0800
Delivery-date: Tue, 02 Feb 2010 19:01:08 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=g49+vfHcaWG1lvpXhOuKKl/7v1t3DO2hhRQ+X7x3/UI=; b=ldPpv+AIAG3n6ozIvCnFAlY6+FsKNrVvyaLx44uWRd5XNLiqjTDcys/yX+8AZQi4Z5 e9ZbLYWQNiljo/+GL8SN8BMkYqONWqE4kvl64/pCZMW4tMwRkfdUIxdDDUq/JKoaeu4s NiXguLRTq6JPdt4ngba8jcN1Ek10qwlbzQtnI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ChLzGsQhXv0rqxOnhH2cIZsPKgAGSQZfM3VNkBUsVPOsHuCfnv/Ed8ZNZ0J6KqeGl0 iFAH04UN80ArXoIeV6SaOvkWFw0VbXq2Lglu+U8wwJEYfDVOpHzSN9pqTHik/7AMDhn6 9F+IabXSOzeAjZAPsPVl0gtdYUjQ6FY15O6Ew=
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
We are trying to set page guards in EPT entry to intercept the access to certain guest page on 32-bit hvm guest.
Though we have briefly investigated into the p2m module and the ept module in xen, we only got an awkward approach that hacks into the EPT.
1. We depend on ept_set_entry to split super page into normal 4K pages first.
2. We employ the similar way that ept_set_entry has done to find an entry. Once found, we modify its access bit (rwx) violently after the p2m_type_t has applied its rules to these bits.
3. We hook the ept_handle_violation to intercept these ept violations that will cause domain crash and find out if these faults are caused by formal modifications in 2 and settle them.
Then we come across several problems:
We use map_domain_page to map the ept table that contains the target entry. After changing the access bits in that entry, we use unmap_domain_page to activate the modification. But it seems that when we again map the ept table and fetch the exact entry we've modified just before, our modifications haven't taken effect. Any sometimes the modification will cause interception while in some cases it doesn'. Is there anything to do which our using of map/unmap functions? Or do we need to flush something when we have made the modifications?

--
Kenmark
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>