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

[Xen-devel] Entry points for updates to shadow PTs


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Mike Sun" <msun@xxxxxxxxxx>
  • Date: Fri, 2 May 2008 00:15:05 -0400
  • Delivery-date: Thu, 01 May 2008 21:15:38 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=uyVAYiqH39oLkKetmax82hRhYpM+VLesebbk0zgfknJb+i7N/cfCimjjqrq8ckbkP+lM1Km6HJBpqqld+P6v137ZmoCRrpRPGi9RZGEN0AYdkIB/lqL+1gVtp6rMAUcsl+LIxIBJa7MJdjsqYykEU+4o28Jwk4fhcOJT4giFogg=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

For some CoW purposes, I'm marking all of a the PTEs of ab HVM guest's
current shadow PTs read-only and catching shadow PT induced page
faults to perform the CoW.  I've modified the page fault handler in
xen/arch/x86/mm/shadow/multi.c to catch our CoW induced faults as well
as the sh_update_cr3 function to go through and mark all shadow PTEs
read-only for the new set of PTs created on the address space change.
It seems that for some types of page faults, the shadow PTEs are
mucked with and brought back into line with the guest PTEs, which
could revert a read-only shadow PTE back to writable.  I can handle
this case in the page fault handler to remark those pages read-only in
the shadow PTE, but I'm afraid there are other places in which the
shadow PTEs are mucked with (e.g. x86 guest PT write emulations) which
could break my read-only requirement.

In which places can shadow PTEs be changed and/or where is the best
place for me to check to see if I must remark them read-only for my
purposes?  Maybe in a low level function like "shadow_set_l1e"?

Thanks,
Mike

_______________________________________________
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®.