[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC Patch v2 07/16] colo: implement restore_callbacks get_page()
This patch implements restore callbacks for colo: 1. get_page(): We have cache the whole memory, so just return the buffer. This page is also marked as dirty. Signed-off-by: Ye Wei <wei.ye1987@xxxxxxxxx> Signed-off-by: Jiang Yunhong <yunhong.jiang@xxxxxxxxx> Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx> --- tools/libxc/xc_domain_restore_colo.c | 9 +++++++++ tools/libxc/xc_save_restore_colo.h | 1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tools/libxc/xc_domain_restore_colo.c b/tools/libxc/xc_domain_restore_colo.c index 674e55e..77b63b6 100644 --- a/tools/libxc/xc_domain_restore_colo.c +++ b/tools/libxc/xc_domain_restore_colo.c @@ -143,3 +143,12 @@ void colo_free(struct restore_data *comm_data, void *data) xc_evtchn_close(colo_data->xce); free(colo_data); } + +char* colo_get_page(struct restore_data *comm_data, void *data, + unsigned long pfn) +{ + struct restore_colo_data *colo_data = data; + + set_bit(pfn, colo_data->dirty_pages); + return colo_data->pagebase + pfn * PAGE_SIZE; +} diff --git a/tools/libxc/xc_save_restore_colo.h b/tools/libxc/xc_save_restore_colo.h index b5416af..67c567c 100644 --- a/tools/libxc/xc_save_restore_colo.h +++ b/tools/libxc/xc_save_restore_colo.h @@ -6,5 +6,6 @@ extern int colo_init(struct restore_data *, void **); extern void colo_free(struct restore_data *, void *); +extern char *colo_get_page(struct restore_data *, void *, unsigned long); #endif -- 1.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |