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] [Queries] Unpinning and Unhooking shadow

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [Queries] Unpinning and Unhooking shadow
From: jeet <jeet_sat12@xxxxxxxxxxx>
Date: Wed, 14 Mar 2007 21:12:39 +0530 (IST)
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Delivery-date: Wed, 14 Mar 2007 08:41:47 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=LGnOLSJDL5kbZkXznNOz7ZZoEvZiqGWoywrhkVxsC0GonejrkKCuinzlhuGRDjIFCYrH9Tox8jSbp4wuaWLOBIgYnt4yrKzehSkaN6CHiRGm7E2IcEd7ylrRQ2yx7ITcZwr+yh1omje+JfiSdO0Yf0Bq8l9ToYuHGR2+ft8GFhc=;
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
Hi All,

I have some queries regarding unpinning and unhooking top level shadow page 
table for HVM guest on page fault.

whenever we try to make some space prior to allocating the shadow using 
prealloc_shadaow() call 

1. we do back traversing of per domain list of top level shadow pages and try 
to unpin them using function call sh_unpin()

but in unpinning shadow we are unsetting pin bit in page->count_info and 
decrement the reference count of shadow page
using call to sh_put_ref() [define in xen/arch/x86/mm/shadow/private.h]

but in this function I am not able to understand why this condition is 
unlikely? 

if ( unlikely(nx == 0) ) 
        sh_destroy_shadow(v, smfn);

as we are trying to make space for new shadow which would be created using 
shadow_alloc() 
so this sh_destroy_shadow must be called for any one of the entry in toplevel 
list to free space of at least required order 
and put back the pages in freelist of shadow pool ?

2. if we could not free space for shadow creation by this then why are we not 
pinning all the top level pages again while we are 
marking them unpinned while traversing the top level list? 
Or is it not necessary to pinned all top level shadows in list? or it has some 
other significance?

3. Also after this if still space is not free then we try to unhooking the same 
toplevel list  by going though each entry in list and 
marking corresponding PML4 table's entries as 0 if that entry was marked 
PRESENT.

But I am not able to understand how this will return pages back to per domain 
freelist of shadow pages?

Please correct if there is something wrong in my understanding or if I have 
missed any piece of code in this flow

Plz provide your valuable replies to clear my queries/doubts.

Jeet




                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

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

<Prev in Thread] Current Thread [Next in Thread>