From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emre Can Sezer Subject: Two shadow page tables for HVM Date: Wed, 17 Dec 2008 18:06:07 -0500 Message-ID: <494985DF.9040701@ncsu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel List-Id: xen-devel@lists.xenproject.org Hi, As part of my research I am going to play around with page permissions. However, I might have to do this pretty often, so I'm thinking about having two page tables that are synchronized and only differ in their permissions. The idea is to have a set of permissions when code block A is being executed and another set when block B is being executed. I plan to capture execution jumps by specifying the inactive block as non-executable. I am running a HVM guest on a x86_64 machine. I'm only interested in kernel pages, in that I don't have to have a second page table for user level pages as their permissions will be the same. So far I can think of only two ways of doing this. First, I can have two top level shadow page tables and use one of the unused slots in struct arch_domain to store this page. Then I modify propagate_l*e_from_guest functions to ensure that they create and synchronize the second page table. Second, I can have pages that are twice as large as original page tables. I'm not sure what the implications are concerning shadow cache and the linear page table mappings. Which one of these methods would be easier to implement? Is there an easier way of having two sets of page tables? If I had the means, would it be worth switching to AMD for the NPT? Thanks in advance, John