[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/mm: Allow pages typed as log dirty to also be shared



# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1322751403 0
# Node ID acfd86abd08b91bc97a5d4a5f10ee81c8e243a4a
# Parent  ff752070bd330ed94d19aa4b0a5382af9a1e336e
x86/mm: Allow pages typed as log dirty to also be shared

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---


diff -r ff752070bd33 -r acfd86abd08b xen/arch/x86/mm/mem_sharing.c
--- a/xen/arch/x86/mm/mem_sharing.c     Thu Dec 01 14:56:43 2011 +0000
+++ b/xen/arch/x86/mm/mem_sharing.c     Thu Dec 01 14:56:43 2011 +0000
@@ -697,6 +697,9 @@
     /* Update m2p entry */
     set_gpfn_from_mfn(mfn_x(page_to_mfn(page)), gfn);
 
+    /* Now that the gfn<->mfn map is properly established,
+     * marking dirty is feasible */
+    paging_mark_dirty(d, mfn_x(page_to_mfn(page)));
     put_gfn(d, gfn);
     shr_unlock();
     return 0;
diff -r ff752070bd33 -r acfd86abd08b xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h Thu Dec 01 14:56:43 2011 +0000
+++ b/xen/include/asm-x86/p2m.h Thu Dec 01 14:56:43 2011 +0000
@@ -163,7 +163,8 @@
 /* Shared types */
 /* XXX: Sharable types could include p2m_ram_ro too, but we would need to
  * reinit the type correctly after fault */
-#define P2M_SHARABLE_TYPES (p2m_to_mask(p2m_ram_rw))
+#define P2M_SHARABLE_TYPES (p2m_to_mask(p2m_ram_rw) \
+                            | p2m_to_mask(p2m_ram_logdirty) )
 #define P2M_SHARED_TYPES   (p2m_to_mask(p2m_ram_shared))
 
 /* Broken type: the frame backing this pfn has failed in hardware

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.