[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] HVM page table management


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • 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
  • Importance: Normal
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.