---
hw/xen_backend.c | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index e926a01..fd07c03 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -39,6 +39,7 @@
#include "hw.h"
#include "qemu-char.h"
#include "xen_backend.h"
+#include "xen_interfaces.h"
/* ------------------------------------------------------------- */
@@ -200,19 +201,19 @@ static struct XenDevice *xen_be_get_xendev(char *type,
int dom, int dev,
xendev->debug = debug;
xendev->local_port = -1;
- xendev->evtchndev = xc_evtchn_open();
+ xendev->evtchndev = xc_evtchn.open();
if (xendev->evtchndev < 0) {
fprintf(stderr, "can't open evtchn device\n");
qemu_free(xendev);
return NULL;
}
- fcntl(xc_evtchn_fd(xendev->evtchndev), F_SETFD, FD_CLOEXEC);
+ fcntl(xc_evtchn.fd(xendev->evtchndev), F_SETFD, FD_CLOEXEC);
if (ops->flags & DEVOPS_FLAG_NEED_GNTDEV) {
xendev->gnttabdev = xc_gnttab_open();
if (xendev->gnttabdev < 0) {
fprintf(stderr, "can't open gnttab device\n");
- xc_evtchn_close(xendev->evtchndev);
+ xc_evtchn.close(xendev->evtchndev);
qemu_free(xendev);
return NULL;
}
@@ -260,7 +261,7 @@ static struct XenDevice *xen_be_del_xendev(int dom, int dev)
}
if (xendev->evtchndev >= 0)
- xc_evtchn_close(xendev->evtchndev);
+ xc_evtchn.close(xendev->evtchndev);
if (xendev->gnttabdev >= 0)
xc_gnttab_close(xendev->gnttabdev);
@@ -595,13 +596,13 @@ static void xen_be_evtchn_event(void *opaque)
struct XenDevice *xendev = opaque;
evtchn_port_t port;
- port = xc_evtchn_pending(xendev->evtchndev);
+ port = xc_evtchn.pending(xendev->evtchndev);
if (port != xendev->local_port) {
- xen_be_printf(xendev, 0, "xc_evtchn_pending returned %d (expected
%d)\n",
+ xen_be_printf(xendev, 0, "xc_evtchn.pending returned %d (expected
%d)\n",
port, xendev->local_port);
return;
}
- xc_evtchn_unmask(xendev->evtchndev, port);
+ xc_evtchn.unmask(xendev->evtchndev, port);
if (xendev->ops->event)
xendev->ops->event(xendev);
@@ -644,14 +645,14 @@ int xen_be_bind_evtchn(struct XenDevice *xendev)
{
if (xendev->local_port != -1)
return 0;
- xendev->local_port = xc_evtchn_bind_interdomain
+ xendev->local_port = xc_evtchn.bind_interdomain
(xendev->evtchndev, xendev->dom, xendev->remote_port);
if (-1 == xendev->local_port) {
- xen_be_printf(xendev, 0, "xc_evtchn_bind_interdomain failed\n");
+ xen_be_printf(xendev, 0, "xc_evtchn.bind_interdomain failed\n");
return -1;
}
xen_be_printf(xendev, 2, "bind evtchn port %d\n", xendev->local_port);
- qemu_set_fd_handler(xc_evtchn_fd(xendev->evtchndev),
+ qemu_set_fd_handler(xc_evtchn.fd(xendev->evtchndev),
xen_be_evtchn_event, NULL, xendev);
return 0;
}
@@ -660,15 +661,15 @@ void xen_be_unbind_evtchn(struct XenDevice *xendev)
{
if (xendev->local_port == -1)
return;
- qemu_set_fd_handler(xc_evtchn_fd(xendev->evtchndev), NULL, NULL, NULL);
- xc_evtchn_unbind(xendev->evtchndev, xendev->local_port);
+ qemu_set_fd_handler(xc_evtchn.fd(xendev->evtchndev), NULL, NULL, NULL);
+ xc_evtchn.unbind(xendev->evtchndev, xendev->local_port);
xen_be_printf(xendev, 2, "unbind evtchn port %d\n", xendev->local_port);
xendev->local_port = -1;
}
int xen_be_send_notify(struct XenDevice *xendev)
{
- return xc_evtchn_notify(xendev->evtchndev, xendev->local_port);
+ return xc_evtchn.notify(xendev->evtchndev, xendev->local_port);
}
/*
--
1.5.5.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|