MAINTAINERS: Make section QOM cover hw/core/*bus.c as well
[qemu/armbru.git] / include / hw / xen / xen-backend.h
blob010d712638766d4041cba8845c2d5cb9e0c74630
1 /*
2 * Copyright (c) 2018 Citrix Systems Inc.
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
8 #ifndef HW_XEN_BACKEND_H
9 #define HW_XEN_BACKEND_H
11 #include "hw/xen/xen-bus.h"
13 typedef struct XenBackendInstance XenBackendInstance;
15 typedef void (*XenBackendDeviceCreate)(XenBackendInstance *backend,
16 QDict *opts, Error **errp);
17 typedef void (*XenBackendDeviceDestroy)(XenBackendInstance *backend,
18 Error **errp);
20 typedef struct XenBackendInfo {
21 const char *type;
22 XenBackendDeviceCreate create;
23 XenBackendDeviceDestroy destroy;
24 } XenBackendInfo;
26 XenBus *xen_backend_get_bus(XenBackendInstance *backend);
27 const char *xen_backend_get_name(XenBackendInstance *backend);
29 void xen_backend_set_device(XenBackendInstance *backend,
30 XenDevice *xendevice);
31 XenDevice *xen_backend_get_device(XenBackendInstance *backend);
33 void xen_backend_register(const XenBackendInfo *info);
35 void xen_backend_device_create(XenBus *xenbus, const char *type,
36 const char *name, QDict *opts, Error **errp);
37 bool xen_backend_try_device_destroy(XenDevice *xendev, Error **errp);
39 #endif /* HW_XEN_BACKEND_H */