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] [PATCH 0/6] Support exchange page from user space tools

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 0/6] Support exchange page from user space tools
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Sun, 31 May 2009 19:10:35 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 31 May 2009 04:11:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acnh4Guyhvf/TFTaTj69VIy/VE+2gw==
Thread-topic: [PATCH 0/6] Support exchange page from user space tools
The followed patches are to support exchange a page from user space tools for a 
PV guest.
Patches 1~4 are just user space changes(1~3 are minor changes). But patch 5/6 
need more discussion and review.

Thanks
Yunhong Jiang

Patch 1- export_xc_map_m2p.patch
export the map_m2p functin .

Patch 2 - grant_check.patch
Add a function so that user space can check if a page is granted or not.

Patch 3 - map_p2m.patch
This patch firstly change the xc_core_arch_map_p2m() to map the p2m to be 
writable, then it export this function.

Patch 4 - xc_exchange.patch
This patch support exchange a page for PV guest.  See the patch for more 
information.

Patch 5 - mem_exchange.patch
Currently XENMEM_exchange only support exchange memory for current domain, This 
patch extend it to foreign domain once the target domain is in suspended state. 

Patch 6 - update_pt.patch
Currently MMU_PT_UPDATE_RESERVE_AD support only update page table for current 
domain. This patch add support for foreign domain also.
This patch make the mod_lx_entry and get_page_from_lxe much more complex, 
especially considering the parameter definition for these function are not 
described so clearly. See discussion in 
http://lists.xensource.com/archives/html/xen-devel/2009-05/msg00629.html for 
more information. I'm not sure if I need do some cleanup before this patch.




Notice:
The basic idea to offline a page is:
1) mark a page offline pending
2) If the page is owned by a HVM domain, user have to live migrate it. 
    In future, with stub-domain support, we can also exchange the page without 
migration.
3) If the page is owned by a PV domain, we will try to exchange the offline 
pending page to a new one and free the old page. 

The method to exchange the offline pending page for PV domain is:

1) Suspend the guest.
2) If the page is being granted out, return with offline pending.
3) Get a copy for the content
4) Scan all page table page to see if any reference to the offending page, if 
yes, make the entry to be non-present to reduce the reference count.
5) After update all page tables, user space tools will try to exchange the old 
page .If the new mfn has no reference anymore (i.e. 
count_info & count_mask = 1), the exchange will allocate a new page, update the 
m2p and return 
success, otherwise it will return fail. 
6) If step 5 is success, user space tools will update the content of the new 
page , change the p2m table, and change all entries scaned in step 4 to point 
to new entry.
if step failed, it will try to undo step 4 to revert page table.
7) Resume the guest.

Please refer to thread in 
http://www.mailinglistarchive.com/xen-devel@xxxxxxxxxxxxxxxxxxx/msg63084.html 
for more informatin.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 0/6] Support exchange page from user space tools, Jiang, Yunhong <=