aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/paging.h
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2007-06-11 14:35:52 +0100
committerTim Deegan <Tim.Deegan@xensource.com>2007-06-11 14:35:52 +0100
commitc8123f7439fc42b33c8a6c3a9a89973133b83da0 (patch)
treecf0a18b3be33881f990c06a2bb39f7eb18d2b9cd /xen/include/asm-x86/paging.h
parentbc47ea384baadc8fc704f23a302da3d5ed80d39c (diff)
downloadxen-c8123f7439fc42b33c8a6c3a9a89973133b83da0.tar.gz
xen-c8123f7439fc42b33c8a6c3a9a89973133b83da0.tar.bz2
xen-c8123f7439fc42b33c8a6c3a9a89973133b83da0.zip
[XEN] Make common log-dirty paging code and add HAP log-dirty support.
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Diffstat (limited to 'xen/include/asm-x86/paging.h')
-rw-r--r--xen/include/asm-x86/paging.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h
index 0a3b01ce85..0f2809fe94 100644
--- a/xen/include/asm-x86/paging.h
+++ b/xen/include/asm-x86/paging.h
@@ -63,6 +63,9 @@
#define paging_mode_translate(_d) ((_d)->arch.paging.mode & PG_translate)
#define paging_mode_external(_d) ((_d)->arch.paging.mode & PG_external)
+/* flags used for paging debug */
+#define PAGING_DEBUG_LOGDIRTY 0
+
/******************************************************************************
* The equivalent for a particular vcpu of a shadowed domain. */
@@ -136,6 +139,29 @@ struct paging_mode {
struct shadow_paging_mode shadow;
};
+/*****************************************************************************
+ * Log dirty code */
+
+/* allocate log dirty bitmap resource for recording dirty pages */
+int paging_alloc_log_dirty_bitmap(struct domain *d);
+
+/* free log dirty bitmap resource */
+void paging_free_log_dirty_bitmap(struct domain *d);
+
+/* enable log dirty */
+int paging_log_dirty_enable(struct domain *d);
+
+/* disable log dirty */
+int paging_log_dirty_disable(struct domain *d);
+
+/* log dirty initialization */
+void paging_log_dirty_init(struct domain *d,
+ int (*enable_log_dirty)(struct domain *d),
+ int (*disable_log_dirty)(struct domain *d),
+ void (*clean_dirty_bitmap)(struct domain *d));
+
+/* mark a page as dirty */
+void paging_mark_dirty(struct domain *d, unsigned long guest_mfn);
/*****************************************************************************
* Entry points into the paging-assistance code */