diff options
author | Juergen Gross | 2016-11-22 07:10:58 +0100 |
---|---|---|
committer | Stefano Stabellini | 2016-11-22 19:29:39 +0100 |
commit | 3a6c9172ac5951e6dac2b3f6cbce3cfccdec5894 (patch) | |
tree | ab1ec8ce8b7246b96d7dee39f99a4dd3ef3b1559 /include/hw/xen/xen_backend.h | |
parent | qdev: add function qdev_set_id() (diff) | |
download | qemu-3a6c9172ac5951e6dac2b3f6cbce3cfccdec5894.tar.gz qemu-3a6c9172ac5951e6dac2b3f6cbce3cfccdec5894.tar.xz qemu-3a6c9172ac5951e6dac2b3f6cbce3cfccdec5894.zip |
xen: create qdev for each backend device
Create a qdev plugged to the xen-sysbus for each new backend device.
This device can be used as a parent for all needed devices of that
backend. The id of the new device will be "xen-<type>-<dev>" with
<type> being the xen backend type (e.g. "qdisk") and <dev> the xen
backend number of the type under which it is to be found in xenstore.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'include/hw/xen/xen_backend.h')
-rw-r--r-- | include/hw/xen/xen_backend.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h index 38f730ef6e..4f4799a610 100644 --- a/include/hw/xen/xen_backend.h +++ b/include/hw/xen/xen_backend.h @@ -8,6 +8,10 @@ #define TYPE_XENSYSDEV "xen-sysdev" #define TYPE_XENSYSBUS "xen-sysbus" +#define TYPE_XENBACKEND "xen-backend" + +#define XENBACKEND_DEVICE(obj) \ + OBJECT_CHECK(XenDevice, (obj), TYPE_XENBACKEND) /* variables */ extern xc_interface *xen_xc; |