aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/paging.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-06-04 22:25:10 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-06-04 22:25:10 +0100
commit183d02baf2fe56ad83784f0c9011d5dc7fee1502 (patch)
tree9165062c3f3c525780d041c5d3346e86901b0fd7 /xen/include/asm-x86/paging.h
parent57d9503643d99ef7a1b167038e39b4ab4bd477fd (diff)
downloadxen-183d02baf2fe56ad83784f0c9011d5dc7fee1502.tar.gz
xen-183d02baf2fe56ad83784f0c9011d5dc7fee1502.tar.bz2
xen-183d02baf2fe56ad83784f0c9011d5dc7fee1502.zip
x86: hap dirty vram tracking
Currently HAP systems suffer a significant performance loss when a vnc client is connect or the sdl interface is used, because HAP is lacking an implementation of track_dirty_vram. As a consequence qemu always tries to update the whole screen because it does not know which areas of the screen have been updated by the guest. This patch implements track_dirty_vram for HAP enabling the logdirty mechanism only in a specific gfn range and adding a paging_log_dirty_range function that returns the log dirty bitmap in a requested range. Paging_log_dirty_range is different from paging_log_dirty_op because operates on a range and also because it does not pause the domain. In order not to lose any update I moved clean_dirty_bitmap at the beginning of the function before evaluating the logdirty bitmap. The bitmap is still safe because it is protected by the logdirty lock. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'xen/include/asm-x86/paging.h')
-rw-r--r--xen/include/asm-x86/paging.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h
index 11e96ee957..f26c5e83a7 100644
--- a/xen/include/asm-x86/paging.h
+++ b/xen/include/asm-x86/paging.h
@@ -139,6 +139,12 @@ int paging_alloc_log_dirty_bitmap(struct domain *d);
/* free log dirty bitmap resource */
void paging_free_log_dirty_bitmap(struct domain *d);
+/* get the dirty bitmap for a specific range of pfns */
+int paging_log_dirty_range(struct domain *d,
+ unsigned long begin_pfn,
+ unsigned long nr,
+ XEN_GUEST_HANDLE_64(uint8) dirty_bitmap);
+
/* enable log dirty */
int paging_log_dirty_enable(struct domain *d);
@@ -176,6 +182,15 @@ void paging_mark_dirty(struct domain *d, unsigned long guest_mfn);
#define L4_LOGDIRTY_IDX(pfn) 0
#endif
+/* VRAM dirty tracking support */
+struct sh_dirty_vram {
+ unsigned long begin_pfn;
+ unsigned long end_pfn;
+ paddr_t *sl1ma;
+ uint8_t *dirty_bitmap;
+ s_time_t last_dirty;
+};
+
/*****************************************************************************
* Entry points into the paging-assistance code */