aboutsummaryrefslogtreecommitdiff
path: root/include/hw/xen/xen-bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/xen/xen-bus.h')
-rw-r--r--include/hw/xen/xen-bus.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h
index 0cb12464ce..85a75d8dec 100644
--- a/include/hw/xen/xen-bus.h
+++ b/include/hw/xen/xen-bus.h
@@ -8,12 +8,19 @@
#ifndef HW_XEN_BUS_H
#define HW_XEN_BUS_H
+#include "hw/xen/xen_common.h"
#include "hw/sysbus.h"
typedef struct XenDevice {
DeviceState qdev;
+ domid_t frontend_id;
+ char *name;
+ char *backend_path, *frontend_path;
+ enum xenbus_state backend_state, frontend_state;
+ Notifier exit;
} XenDevice;
+typedef char *(*XenDeviceGetName)(XenDevice *xendev, Error **errp);
typedef void (*XenDeviceRealize)(XenDevice *xendev, Error **errp);
typedef void (*XenDeviceUnrealize)(XenDevice *xendev, Error **errp);
@@ -21,6 +28,9 @@ typedef struct XenDeviceClass {
/*< private >*/
DeviceClass parent_class;
/*< public >*/
+ const char *backend;
+ const char *device;
+ XenDeviceGetName get_name;
XenDeviceRealize realize;
XenDeviceUnrealize unrealize;
} XenDeviceClass;
@@ -35,6 +45,8 @@ typedef struct XenDeviceClass {
typedef struct XenBus {
BusState qbus;
+ domid_t backend_id;
+ struct xs_handle *xsh;
} XenBus;
typedef struct XenBusClass {