mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-08 16:07:39 -06:00
xen: add implementations of xen-block connect and disconnect functions...
...and wire in the dataplane. This patch adds the remaining code to make the xen-block XenDevice functional. The parameters that a block frontend expects to find are populated in the backend xenstore area, and the 'ring-ref' and 'event-channel' values specified in the frontend xenstore area are mapped/bound and used to set up the dataplane. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Anthony Perard <anthony.perard@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
parent
d4683cf952
commit
b6af8926fb
5 changed files with 353 additions and 26 deletions
|
@ -9,6 +9,9 @@
|
|||
#define HW_XEN_BLOCK_H
|
||||
|
||||
#include "hw/xen/xen-bus.h"
|
||||
#include "hw/block/block.h"
|
||||
#include "hw/block/dataplane/xen-block.h"
|
||||
#include "sysemu/iothread.h"
|
||||
|
||||
typedef enum XenBlockVdevType {
|
||||
XEN_BLOCK_VDEV_TYPE_INVALID,
|
||||
|
@ -28,11 +31,17 @@ typedef struct XenBlockVdev {
|
|||
|
||||
typedef struct XenBlockProperties {
|
||||
XenBlockVdev vdev;
|
||||
BlockConf conf;
|
||||
unsigned int max_ring_page_order;
|
||||
IOThread *iothread;
|
||||
} XenBlockProperties;
|
||||
|
||||
typedef struct XenBlockDevice {
|
||||
XenDevice xendev;
|
||||
XenBlockProperties props;
|
||||
const char *device_type;
|
||||
unsigned int info;
|
||||
XenBlockDataPlane *dataplane;
|
||||
} XenBlockDevice;
|
||||
|
||||
typedef void (*XenBlockDeviceRealize)(XenBlockDevice *blockdev, Error **errp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue