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] Getting Machine Physical address from page-fault CR2...

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Getting Machine Physical address from page-fault CR2...
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Wed, 29 Nov 2006 17:05:32 +0100
Delivery-date: Wed, 29 Nov 2006 08:05:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccT0DHNfQAh2e1GS1KY0djL2qcpjQ==
Thread-topic: Getting Machine Physical address from page-fault CR2...
I'm trying to write a piece of code to check writes to MMIO-space (as
part of the Configuration Change Verifier, as discussed at the Security
Mini-summit at Summer Xen-Summit in San Jose some weeks back). 

This code needs to check if a physical address matches some list of
known physical addresses... My problem right now is that the method I
thought would work for translating the value in CR2 (after some other
initial checking - like that the page is actually present), doesn't
work... I tried something along the lines of:

traps.c: do_page_fault():
pa = shadow_gva_to_gpa(current, addr); /* addr = read_cr2() earlier in
the code */

It appeats that current->arch.shadow.mode is sometimes NULL, which isn't
what I expected... 

Is there some other (better?) way to achieve this? I mean aside from
walking the page-table?

--
Mats



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Getting Machine Physical address from page-fault CR2..., Petersson, Mats <=