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] xenpaging: drop xc.c, move xc_mem_paging_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenpaging: drop xc.c, move xc_mem_paging_flush_ioemu_cache
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 28 Jun 2011 07:44:22 +0100
Delivery-date: Mon, 27 Jun 2011 23:48:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Olaf Hering <olaf@xxxxxxxxx>
# Date 1307695630 -7200
# Node ID 480e548fe76bd4a7153ffab1bc34a17dce0d173a
# Parent  9ce56626a5ab99ae07886fd1173363237c66de2e
xenpaging: drop xc.c, move xc_mem_paging_flush_ioemu_cache

Move xc_mem_paging_flush_ioemu_cache() into xenpaging and massage it a bit to
use the required members from xenpaging_t.
Also update type of rc to match xs_write() return value.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r 9ce56626a5ab -r 480e548fe76b tools/xenpaging/xc.c
--- a/tools/xenpaging/xc.c      Fri Jun 10 10:47:08 2011 +0200
+++ b/tools/xenpaging/xc.c      Fri Jun 10 10:47:10 2011 +0200
@@ -31,24 +31,6 @@
 
 
 
-int xc_mem_paging_flush_ioemu_cache(domid_t domain_id)
-{
-    struct xs_handle *xsh = NULL;
-    char path[80];
-    int rc;
-
-    sprintf(path, "/local/domain/0/device-model/%u/command", domain_id);
-
-    xsh = xs_daemon_open();
-    if ( xsh == NULL )
-        return -EIO;
-
-    rc = xs_write(xsh, XBT_NULL, path, "flush-cache", strlen("flush-cache")); 
-
-    xs_daemon_close(xsh);
-
-    return rc ? 0 : -1;
-}
 
 int xc_wait_for_event_or_timeout(xc_interface *xch, xc_evtchn *xce, unsigned 
long ms)
 {
diff -r 9ce56626a5ab -r 480e548fe76b tools/xenpaging/xc.h
--- a/tools/xenpaging/xc.h      Fri Jun 10 10:47:08 2011 +0200
+++ b/tools/xenpaging/xc.h      Fri Jun 10 10:47:10 2011 +0200
@@ -37,7 +37,6 @@
 
 
 
-int xc_mem_paging_flush_ioemu_cache(domid_t domain_id);
 int xc_wait_for_event_or_timeout(xc_interface *xch, xc_evtchn *xce, unsigned 
long ms);
 
 
diff -r 9ce56626a5ab -r 480e548fe76b tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:08 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:10 2011 +0200
@@ -48,6 +48,20 @@
         unlink(filename);
 }
 
+static int xenpaging_mem_paging_flush_ioemu_cache(xenpaging_t *paging)
+{
+    struct xs_handle *xsh = paging->xs_handle;
+    domid_t domain_id = paging->mem_event.domain_id;
+    char path[80];
+    bool rc;
+
+    sprintf(path, "/local/domain/0/device-model/%u/command", domain_id);
+
+    rc = xs_write(xsh, XBT_NULL, path, "flush-cache", strlen("flush-cache")); 
+
+    return rc == true ? 0 : -1;
+}
+
 static void *init_page(void)
 {
     void *buffer;
@@ -484,7 +498,7 @@
         else
         {
             if ( j++ % 1000 == 0 )
-                if ( 
xc_mem_paging_flush_ioemu_cache(paging->mem_event.domain_id) )
+                if ( xenpaging_mem_paging_flush_ioemu_cache(paging) )
                     ERROR("Error flushing ioemu cache");
         }
     }

_______________________________________________
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] xenpaging: drop xc.c, move xc_mem_paging_flush_ioemu_cache, Xen patchbot-unstable <=