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] [qemu-xen-unstable] qemu-xen: update for libxc evtchn in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen: update for libxc evtchn interface change
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 07:35:04 -0800
Delivery-date: Thu, 23 Dec 2010 07:35:11 -0800
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
commit b7754ca4a80e9a53b848796c860d19d6fa7a6d08
Author: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date:   Thu Dec 23 15:21:52 2010 +0000

    qemu-xen: update for libxc evtchn interface change
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 hw/xen_backend.c  |    6 +++---
 hw/xen_backend.h  |    2 +-
 i386-dm/helper2.c |    8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index 537e21f..577f68e 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -208,8 +208,8 @@ static struct XenDevice *xen_be_get_xendev(const char 
*type, int dom, int dev,
     xendev->debug      = debug;
     xendev->local_port = -1;
 
-    xendev->evtchndev = xc_evtchn_open();
-    if (xendev->evtchndev < 0) {
+    xendev->evtchndev = xc_evtchn_open(NULL, 0);
+    if (xendev->evtchndev == NULL) {
        xen_be_printf(NULL, 0, "can't open evtchn device\n");
        qemu_free(xendev);
        return NULL;
@@ -267,7 +267,7 @@ static struct XenDevice *xen_be_del_xendev(int dom, int dev)
            qemu_free(xendev->fe);
        }
 
-       if (xendev->evtchndev >= 0)
+       if (xendev->evtchndev != NULL)
            xc_evtchn_close(xendev->evtchndev);
        if (xendev->gnttabdev >= 0)
            xc_gnttab_close(xc_handle, xendev->gnttabdev);
diff --git a/hw/xen_backend.h b/hw/xen_backend.h
index 28e77ac..a68067d 100644
--- a/hw/xen_backend.h
+++ b/hw/xen_backend.h
@@ -44,7 +44,7 @@ struct XenDevice {
     int                remote_port;
     int                local_port;
 
-    int                evtchndev;
+    xc_evtchn          *evtchndev;
     int                gnttabdev;
 
     struct XenDevOps   *ops;
diff --git a/i386-dm/helper2.c b/i386-dm/helper2.c
index ce73421..4993f1e 100644
--- a/i386-dm/helper2.c
+++ b/i386-dm/helper2.c
@@ -104,7 +104,7 @@ buffered_iopage_t *buffered_io_page = NULL;
 QEMUTimer *buffered_io_timer;
 
 /* the evtchn fd for polling */
-int xce_handle = -1;
+xc_interface *xce_handle = NULL;
 
 /* which vcpu we are serving */
 int send_vcpu = 0;
@@ -138,8 +138,8 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
 
         cpu_single_env = env;
 
-        xce_handle = xc_evtchn_open();
-        if (xce_handle == -1) {
+        xce_handle = xc_evtchn_open(NULL, 0);
+        if (xce_handle == NULL) {
             perror("open");
             return NULL;
         }
@@ -553,7 +553,7 @@ int xen_pause_requested;
 int main_loop(void)
 {
     CPUState *env = cpu_single_env;
-    int evtchn_fd = xce_handle == -1 ? -1 : xc_evtchn_fd(xce_handle);
+    int evtchn_fd = xce_handle == NULL ? -1 : xc_evtchn_fd(xce_handle);
     char *qemu_file;
     fd_set fds;
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] qemu-xen: update for libxc evtchn interface change, Ian Jackson <=