summaryrefslogtreecommitdiffstats
path: root/qemu/include/hw/virtio/virtio-blk.h
diff options
context:
space:
mode:
authorRajithaY <rajithax.yerrumsetty@intel.com>2017-04-25 03:31:15 -0700
committerRajitha Yerrumchetty <rajithax.yerrumsetty@intel.com>2017-05-22 06:48:08 +0000
commitbb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch)
treeca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/include/hw/virtio/virtio-blk.h
parenta14b48d18a9ed03ec191cf16b162206998a895ce (diff)
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to kvmfornfv repo and make use of the updated latest qemu for the execution of all testcase Change-Id: I1280af507a857675c7f81d30c95255635667bdd7 Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/include/hw/virtio/virtio-blk.h')
-rw-r--r--qemu/include/hw/virtio/virtio-blk.h91
1 files changed, 0 insertions, 91 deletions
diff --git a/qemu/include/hw/virtio/virtio-blk.h b/qemu/include/hw/virtio/virtio-blk.h
deleted file mode 100644
index 8f2b05651..000000000
--- a/qemu/include/hw/virtio/virtio-blk.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Virtio Block Device
- *
- * Copyright IBM, Corp. 2007
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU GPL, version 2. See
- * the COPYING file in the top-level directory.
- *
- */
-
-#ifndef _QEMU_VIRTIO_BLK_H
-#define _QEMU_VIRTIO_BLK_H
-
-#include "standard-headers/linux/virtio_blk.h"
-#include "hw/virtio/virtio.h"
-#include "hw/block/block.h"
-#include "sysemu/iothread.h"
-#include "sysemu/block-backend.h"
-
-#define TYPE_VIRTIO_BLK "virtio-blk-device"
-#define VIRTIO_BLK(obj) \
- OBJECT_CHECK(VirtIOBlock, (obj), TYPE_VIRTIO_BLK)
-
-/* This is the last element of the write scatter-gather list */
-struct virtio_blk_inhdr
-{
- unsigned char status;
-};
-
-struct VirtIOBlkConf
-{
- BlockConf conf;
- IOThread *iothread;
- char *serial;
- uint32_t scsi;
- uint32_t config_wce;
- uint32_t request_merging;
-};
-
-struct VirtIOBlockDataPlane;
-
-struct VirtIOBlockReq;
-typedef struct VirtIOBlock {
- VirtIODevice parent_obj;
- BlockBackend *blk;
- VirtQueue *vq;
- void *rq;
- QEMUBH *bh;
- VirtIOBlkConf conf;
- unsigned short sector_mask;
- bool original_wce;
- VMChangeStateEntry *change;
- bool dataplane_disabled;
- bool dataplane_started;
- struct VirtIOBlockDataPlane *dataplane;
-} VirtIOBlock;
-
-typedef struct VirtIOBlockReq {
- VirtQueueElement elem;
- int64_t sector_num;
- VirtIOBlock *dev;
- struct virtio_blk_inhdr *in;
- struct virtio_blk_outhdr out;
- QEMUIOVector qiov;
- size_t in_len;
- struct VirtIOBlockReq *next;
- struct VirtIOBlockReq *mr_next;
- BlockAcctCookie acct;
-} VirtIOBlockReq;
-
-#define VIRTIO_BLK_MAX_MERGE_REQS 32
-
-typedef struct MultiReqBuffer {
- VirtIOBlockReq *reqs[VIRTIO_BLK_MAX_MERGE_REQS];
- unsigned int num_reqs;
- bool is_write;
-} MultiReqBuffer;
-
-void virtio_blk_init_request(VirtIOBlock *s, VirtIOBlockReq *req);
-void virtio_blk_free_request(VirtIOBlockReq *req);
-
-void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb);
-
-void virtio_blk_submit_multireq(BlockBackend *blk, MultiReqBuffer *mrb);
-
-void virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq);
-
-#endif