[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] 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;
 
-- 
1.5.6.5


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.