ia64/xen-unstable
changeset 17007:ef67e2867b44
[IA64] Cleanup in xc_ia64_linux_save.c
xc_ia64_shadow_control() is not needed any more
since xc_shadow_control() was xencommized.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xc_ia64_shadow_control() is not needed any more
since xc_shadow_control() was xencommized.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author | Alex Williamson <alex.williamson@hp.com> |
---|---|
date | Wed Feb 13 10:35:56 2008 -0700 (2008-02-13) |
parents | 390707dd4c2f |
children | 0a2ee4279326 |
files | tools/libxc/ia64/xc_ia64_linux_save.c |
line diff
1.1 --- a/tools/libxc/ia64/xc_ia64_linux_save.c Wed Feb 13 10:34:18 2008 -0700 1.2 +++ b/tools/libxc/ia64/xc_ia64_linux_save.c Wed Feb 13 10:35:56 2008 -0700 1.3 @@ -52,33 +52,6 @@ static inline void set_bit(int nr, volat 1.4 BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr)); 1.5 } 1.6 1.7 -static int xc_ia64_shadow_control(int xc_handle, 1.8 - uint32_t domid, 1.9 - unsigned int sop, 1.10 - unsigned long *dirty_bitmap, 1.11 - unsigned long pages, 1.12 - xc_shadow_op_stats_t *stats) 1.13 -{ 1.14 - if (dirty_bitmap != NULL && pages > 0) { 1.15 - int i; 1.16 - unsigned char *bmap = (unsigned char *)dirty_bitmap; 1.17 - unsigned long bmap_bytes = 1.18 - ((pages + BITS_PER_LONG - 1) & ~(BITS_PER_LONG - 1)) / 8; 1.19 - unsigned int bmap_pages = (bmap_bytes + PAGE_SIZE - 1) / PAGE_SIZE; 1.20 - 1.21 - /* Touch the page so that it is in the TC. 1.22 - FIXME: use a more reliable method. */ 1.23 - for (i = 0 ; i < bmap_pages ; i++) 1.24 - bmap[i * PAGE_SIZE] = 0; 1.25 - /* Because bmap is not page aligned (allocated by malloc), be sure the 1.26 - last page is touched. */ 1.27 - bmap[bmap_bytes - 1] = 0; 1.28 - } 1.29 - 1.30 - return xc_shadow_control(xc_handle, domid, sop, 1.31 - dirty_bitmap, pages, NULL, 0, stats); 1.32 -} 1.33 - 1.34 static int 1.35 suspend_and_state(int (*suspend)(int), int xc_handle, int io_fd, 1.36 int dom, xc_dominfo_t *info) 1.37 @@ -523,9 +496,9 @@ xc_domain_save(int xc_handle, int io_fd, 1.38 /* Domain is still running at this point */ 1.39 if (live) { 1.40 1.41 - if (xc_ia64_shadow_control(xc_handle, dom, 1.42 - XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY, 1.43 - NULL, 0, NULL ) < 0) { 1.44 + if (xc_shadow_control(xc_handle, dom, 1.45 + XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY, 1.46 + NULL, 0, NULL, 0, NULL ) < 0) { 1.47 ERROR("Couldn't enable shadow mode"); 1.48 goto out; 1.49 } 1.50 @@ -621,9 +594,10 @@ xc_domain_save(int xc_handle, int io_fd, 1.51 slightly wasteful to peek the whole array evey time, 1.52 but this is fast enough for the moment. */ 1.53 if (!last_iter) { 1.54 - if (xc_ia64_shadow_control(xc_handle, dom, 1.55 - XEN_DOMCTL_SHADOW_OP_PEEK, 1.56 - to_skip, p2m_size, NULL) != p2m_size) { 1.57 + if (xc_shadow_control(xc_handle, dom, 1.58 + XEN_DOMCTL_SHADOW_OP_PEEK, 1.59 + to_skip, p2m_size, 1.60 + NULL, 0, NULL) != p2m_size) { 1.61 ERROR("Error peeking shadow bitmap"); 1.62 goto out; 1.63 } 1.64 @@ -711,9 +685,10 @@ xc_domain_save(int xc_handle, int io_fd, 1.65 } 1.66 1.67 /* Pages to be sent are pages which were dirty. */ 1.68 - if (xc_ia64_shadow_control(xc_handle, dom, 1.69 - XEN_DOMCTL_SHADOW_OP_CLEAN, 1.70 - to_send, p2m_size, NULL ) != p2m_size) { 1.71 + if (xc_shadow_control(xc_handle, dom, 1.72 + XEN_DOMCTL_SHADOW_OP_CLEAN, 1.73 + to_send, p2m_size, 1.74 + NULL, 0, NULL ) != p2m_size) { 1.75 ERROR("Error flushing shadow PT"); 1.76 goto out; 1.77 } 1.78 @@ -771,8 +746,9 @@ xc_domain_save(int xc_handle, int io_fd, 1.79 out: 1.80 1.81 if (live) { 1.82 - if (xc_ia64_shadow_control(xc_handle, dom, XEN_DOMCTL_SHADOW_OP_OFF, 1.83 - NULL, 0, NULL ) < 0) { 1.84 + if (xc_shadow_control(xc_handle, dom, 1.85 + XEN_DOMCTL_SHADOW_OP_OFF, 1.86 + NULL, 0, NULL, 0, NULL ) < 0) { 1.87 DPRINTF("Warning - couldn't disable shadow mode"); 1.88 } 1.89 }