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

Re: [Xen-devel] Walking an HVM's shadow page tables and other memory man

To: Roger Cruz <rcruz@xxxxxxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Walking an HVM's shadow page tables and other memory management questions.
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Sat, 07 Jul 2007 09:42:34 +0100
Cc: Tim Deegan <tim.deegan@xxxxxxxxxxxxx>
Delivery-date: Sat, 07 Jul 2007 01:37:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <F6E30BE76F1FEF4EA1C2FD98939DFB300260DE4E@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: Ace85x/UfI0H1dvWRx2EYb/Cvt50DwAagmxjAKtbcSAAHQsFew==
Thread-topic: [Xen-devel] Walking an HVM's shadow page tables and other memory management questions.
User-agent: Microsoft-Entourage/11.3.3.061214
The phys-to-machine mechanism needs to be taught about foreign mappings. Currently it will always assume that the pages mapped into the p2m belong to the local domain.

For encoding I would suggest the p2m entries have PAGE_PRESENT clear and then use some special encoding of the N-1 other bits to indicate a foreign page. I expect then shadow code may need modifying to pass around a foreign domain pointer in some contexts.

 -- Keir

On 6/7/07 20:09, "Roger Cruz" <rcruz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

It looks like get_page_and_type is returning 0.
 
(XEN) mm.c:633:d3 l1e_get_flags(l1e) =0x63, shadow_mode_external(d)= 0x4000, current->domain=0x3,get_page_and_type=0x0, get_page(page, d)=0x0
(XEN) mm.c:639:d3 Error getting mfn 14f0d4 (pfn 1697) from L1 entry 000000014f0d4063 for dom3
 
Domain 2 is the grantor and Domain 3 is the grantee in this example.  It appears to me that it is failing because dom3 is not the owner of the shared page
 
       if ( unlikely((x & PGC_count_mask) == 0) ||  /* Not allocated? */
            unlikely((nx & PGC_count_mask) == 0) || /* Count overflow? */
            unlikely(d != _domain) )               /* Wrong owner? */
 
Any suggestions?

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