WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] Cleanup in xc_ia64_linux_save.c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Cleanup in xc_ia64_linux_save.c
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Feb 2008 07:10:27 -0800
Delivery-date: Fri, 22 Feb 2008 07:29:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1202924156 25200
# Node ID ef67e2867b448a7c4e61d2b28c6bf554fe422250
# Parent  390707dd4c2f8e465fc276fb08108b30c4e9759d
[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@xxxxxxxxxxxxxx>
---
 tools/libxc/ia64/xc_ia64_linux_save.c |   52 +++++++++-------------------------
 1 files changed, 14 insertions(+), 38 deletions(-)

diff -r 390707dd4c2f -r ef67e2867b44 tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c     Wed Feb 13 10:34:18 2008 -0700
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c     Wed Feb 13 10:35:56 2008 -0700
@@ -50,33 +50,6 @@ static inline void set_bit(int nr, volat
 static inline void set_bit(int nr, volatile void * addr)
 {
     BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr));
-}
-
-static int xc_ia64_shadow_control(int xc_handle,
-                                  uint32_t domid,
-                                  unsigned int sop,
-                                  unsigned long *dirty_bitmap,
-                                  unsigned long pages,
-                                  xc_shadow_op_stats_t *stats)
-{
-    if (dirty_bitmap != NULL && pages > 0) {
-        int i;
-        unsigned char *bmap = (unsigned char *)dirty_bitmap;
-        unsigned long bmap_bytes =
-            ((pages + BITS_PER_LONG - 1) & ~(BITS_PER_LONG - 1)) / 8;
-        unsigned int bmap_pages = (bmap_bytes + PAGE_SIZE - 1) / PAGE_SIZE;
-
-        /* Touch the page so that it is in the TC.
-           FIXME: use a more reliable method.  */
-        for (i = 0 ; i < bmap_pages ; i++)
-            bmap[i * PAGE_SIZE] = 0;
-        /* Because bmap is not page aligned (allocated by malloc), be sure the
-           last page is touched.  */
-        bmap[bmap_bytes - 1] = 0;
-    }
-
-    return xc_shadow_control(xc_handle, domid, sop,
-                             dirty_bitmap, pages, NULL, 0, stats);
 }
 
 static int
@@ -523,9 +496,9 @@ xc_domain_save(int xc_handle, int io_fd,
     /* Domain is still running at this point */
     if (live) {
 
-        if (xc_ia64_shadow_control(xc_handle, dom,
-                                   XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY,
-                                   NULL, 0, NULL ) < 0) {
+        if (xc_shadow_control(xc_handle, dom,
+                              XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY,
+                              NULL, 0, NULL, 0, NULL ) < 0) {
             ERROR("Couldn't enable shadow mode");
             goto out;
         }
@@ -621,9 +594,10 @@ xc_domain_save(int xc_handle, int io_fd,
            slightly wasteful to peek the whole array evey time,
            but this is fast enough for the moment. */
         if (!last_iter) {
-            if (xc_ia64_shadow_control(xc_handle, dom,
-                                       XEN_DOMCTL_SHADOW_OP_PEEK,
-                                       to_skip, p2m_size, NULL) != p2m_size) {
+            if (xc_shadow_control(xc_handle, dom,
+                                  XEN_DOMCTL_SHADOW_OP_PEEK,
+                                  to_skip, p2m_size,
+                                  NULL, 0, NULL) != p2m_size) {
                 ERROR("Error peeking shadow bitmap");
                 goto out;
             }
@@ -711,9 +685,10 @@ xc_domain_save(int xc_handle, int io_fd,
             }
 
             /* Pages to be sent are pages which were dirty.  */
-            if (xc_ia64_shadow_control(xc_handle, dom,
-                                       XEN_DOMCTL_SHADOW_OP_CLEAN,
-                                       to_send, p2m_size, NULL ) != p2m_size) {
+            if (xc_shadow_control(xc_handle, dom,
+                                  XEN_DOMCTL_SHADOW_OP_CLEAN,
+                                  to_send, p2m_size,
+                                  NULL, 0, NULL ) != p2m_size) {
                 ERROR("Error flushing shadow PT");
                 goto out;
             }
@@ -771,8 +746,9 @@ xc_domain_save(int xc_handle, int io_fd,
  out:
 
     if (live) {
-        if (xc_ia64_shadow_control(xc_handle, dom, XEN_DOMCTL_SHADOW_OP_OFF,
-                                   NULL, 0, NULL ) < 0) {
+        if (xc_shadow_control(xc_handle, dom,
+                              XEN_DOMCTL_SHADOW_OP_OFF,
+                              NULL, 0, NULL, 0, NULL ) < 0) {
             DPRINTF("Warning - couldn't disable shadow mode");
         }
     }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Cleanup in xc_ia64_linux_save.c, Xen patchbot-unstable <=