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: add xs_handle to struct xenpag

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenpaging: add xs_handle to struct xenpaging
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 28 Jun 2011 07:44:20 +0100
Delivery-date: Mon, 27 Jun 2011 23:48:01 -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 1308750429 -3600
# Node ID 7299a9a44b35a43bb4d5989c3bf88b62570adbde
# Parent  607474aeefe152adf403b599f588ae34e07a360b
xenpaging: add xs_handle to struct xenpaging

A xs_handle is currently used in the xc_mem_paging_flush_ioemu_cache()
function and will be used by a subsequent patch.
Add it to struct xenpaging.

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


diff -r 607474aeefe1 -r 7299a9a44b35 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:03 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Wed Jun 22 14:47:09 2011 +0100
@@ -28,6 +28,7 @@
 #include <signal.h>
 #include <unistd.h>
 #include <xc_private.h>
+#include <xs.h>
 
 #include <xen/mem_event.h>
 
@@ -92,6 +93,14 @@
     paging = malloc(sizeof(xenpaging_t));
     memset(paging, 0, sizeof(xenpaging_t));
 
+    /* Open connection to xenstore */
+    paging->xs_handle = xs_open(0);
+    if ( paging->xs_handle == NULL )
+    {
+        ERROR("Error initialising xenstore connection");
+        goto err;
+    }
+
     p = getenv("XENPAGING_POLICY_MRU_SIZE");
     if ( p && *p )
     {
@@ -221,6 +230,8 @@
  err:
     if ( paging )
     {
+        if ( paging->xs_handle )
+            xs_close(paging->xs_handle);
         xc_interface_close(xch);
         if ( paging->mem_event.shared_page )
         {
@@ -277,6 +288,9 @@
     }
     paging->mem_event.xce_handle = NULL;
     
+    /* Close connection to xenstore */
+    xs_close(paging->xs_handle);
+
     /* Close connection to Xen */
     rc = xc_interface_close(xch);
     if ( rc != 0 )
diff -r 607474aeefe1 -r 7299a9a44b35 tools/xenpaging/xenpaging.h
--- a/tools/xenpaging/xenpaging.h       Fri Jun 10 10:47:03 2011 +0200
+++ b/tools/xenpaging/xenpaging.h       Wed Jun 22 14:47:09 2011 +0100
@@ -36,6 +36,7 @@
 
 typedef struct xenpaging {
     xc_interface *xc_handle;
+    struct xs_handle *xs_handle;
 
     xc_platform_info_t *platform_info;
     xc_domaininfo_t    *domain_info;

_______________________________________________
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: add xs_handle to struct xenpaging, Xen patchbot-unstable <=