blob: 7b8e9df09f7ee7937e26989c0a8d3c59e373d5ca [file] [log] [blame]
Paul Durrantfcab2b42019-01-08 14:48:55 +00001/*
2 * Copyright (c) 2018 Citrix Systems Inc.
3 *
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 */
7
8#ifndef HW_BLOCK_DATAPLANE_XEN_BLOCK_H
9#define HW_BLOCK_DATAPLANE_XEN_BLOCK_H
10
11#include "hw/block/block.h"
12#include "hw/xen/xen-bus.h"
13#include "sysemu/iothread.h"
14
Paul Durrantf3b604e2019-01-08 14:48:56 +000015typedef struct XenBlockDataPlane XenBlockDataPlane;
Paul Durrantfcab2b42019-01-08 14:48:55 +000016
17XenBlockDataPlane *xen_block_dataplane_create(XenDevice *xendev,
Paul Durrant5feeb712019-04-09 17:40:38 +010018 BlockBackend *blk,
19 unsigned int sector_size,
Paul Durrantfcab2b42019-01-08 14:48:55 +000020 IOThread *iothread);
21void xen_block_dataplane_destroy(XenBlockDataPlane *dataplane);
22void xen_block_dataplane_start(XenBlockDataPlane *dataplane,
23 const unsigned int ring_ref[],
24 unsigned int nr_ring_ref,
25 unsigned int event_channel,
26 unsigned int protocol,
27 Error **errp);
28void xen_block_dataplane_stop(XenBlockDataPlane *dataplane);
Stefan Hajnoczif6eac902023-05-16 15:02:29 -040029void xen_block_dataplane_attach(XenBlockDataPlane *dataplane);
30void xen_block_dataplane_detach(XenBlockDataPlane *dataplane);
Paul Durrantfcab2b42019-01-08 14:48:55 +000031
32#endif /* HW_BLOCK_DATAPLANE_XEN_BLOCK_H */