diff options
author | Juergen Gross <jgross@suse.com> | 2016-11-22 07:10:58 +0100 |
---|---|---|
committer | Stefano Stabellini <sstabellini@kernel.org> | 2016-11-22 10:29:39 -0800 |
commit | 3a6c9172ac5951e6dac2b3f6cbce3cfccdec5894 (patch) | |
tree | ab1ec8ce8b7246b96d7dee39f99a4dd3ef3b1559 /hw/xen/xen_pvdev.c | |
parent | ce49b734b4e2a3cc13dc4e11742c0813f1479145 (diff) |
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 'hw/xen/xen_pvdev.c')
-rw-r--r-- | hw/xen/xen_pvdev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c index 5212bc6d9e..aed783e844 100644 --- a/hw/xen/xen_pvdev.c +++ b/hw/xen/xen_pvdev.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" +#include "hw/qdev-core.h" #include "hw/xen/xen_backend.h" #include "hw/xen/xen_pvdev.h" @@ -307,7 +308,8 @@ void xen_pv_del_xendev(struct XenDevice *xendev) } QTAILQ_REMOVE(&xendevs, xendev, next); - g_free(xendev); + + qdev_unplug(&xendev->qdev, NULL); } void xen_pv_insert_xendev(struct XenDevice *xendev) |