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] HVM page table management

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] HVM page table management
From: "Emre Can Sezer" <ecsezer@xxxxxxxx>
Date: Mon, 20 Oct 2008 17:38:56 -0400 (EDT)
Delivery-date: Mon, 20 Oct 2008 14:39:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Normal
In-reply-to: <b8ef0f060810200940m79b026bm87a9b98f2ad75d40@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/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: <13a1c1400810200314h59707fd3r180aad12270babb1@xxxxxxxxxxxxxx> <b8ef0f060810200940m79b026bm87a9b98f2ad75d40@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: SquirrelMail/1.4.10a
Hi,

As part of my research I'm trying to monitor how various LKM's within a
guest kernel interact with each other and the base kernel.  For this and
some other reasons I would like to set page permissions to non-executable
depending on who's code is running.  I have a few areas I'm having
difficulty with.  I'd appreciate any help or pointers.  I'm running a
x86_64 HVM guest on Xen 3.2.2.

For each LKM (guest kernel), I have a list of pages that belong to the
LKM.  I pass this information to Xen with the pfn's of the pages.  So in
Xen context these should be gfn's I guess. Is there an easy way to find
the pte in the shadow page table associated with this guest page and
modify it?

Is there an easy way to tell whether a virtual address is in guest kernel
or user space?  It seems like guest_kernel_mode(v,r) in
include/asm-x86/x86_64/regs.h is meant for PV guests and not for HVM.

Is it possible to change permissions at lvl 2 page tables while keeping
the lvl 1's intact?  Do the permissions propagate from lvl 2 to lvl 1? 
Finally, what's the lowest level I can set permissions on?  Does the
hardware check for permissions at lvl 4 or lvl 3?

Thanks in advance,

John

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