mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
dm: virtio: rename virtio ring structures and feature bits
Some virtio ring structures and virtio feature bits are using the same name/definition as those in kernel header files(linux/ virtio_ring.h, linux/virtio_config.h). Kernel header files must be included to perform ioctls to support vhost. There are compiling errors due to duplicated definitions. In this patch the following renamings are done: VRING_DESC_F_NEXT -> ACRN_VRING_DESC_F_NEXT VRING_DESC_F_WRITE -> ACRN_VRING_DESC_F_WRITE VRING_DESC_F_INDIRECT -> ACRN_VRING_DESC_F_INDIRECT VRING_AVAIL_F_NO_INTERRUPT -> ACRN_VRING_AVAIL_F_NO_INTERRUPT VRING_USED_F_NO_NOTIFY -> ACRN_VRING_USED_F_NO_NOTIFY VIRTIO_F_NOTIFY_ON_EMPTY -> ACRN_VIRTIO_F_NOTIFY_ON_EMPTY VIRTIO_RING_F_INDIRECT_DESC -> ACRN_VIRTIO_RING_F_INDIRECT_DESC VIRTIO_RING_F_EVENT_IDX -> ACRN_VIRTIO_RING_F_EVENT_IDX VIRTIO_F_VERSION_1 -> ACRN_VIRTIO_F_VERSION_1 vring_avail -> virtio_vring_avail vring_used -> virtio_vring_used vring_size -> virtio_vring_size Tracked-On: #1329 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
(VIRTIO_BLK_F_SEG_MAX | \
|
||||
VIRTIO_BLK_F_BLK_SIZE | \
|
||||
VIRTIO_BLK_F_TOPOLOGY | \
|
||||
VIRTIO_RING_F_INDIRECT_DESC) /* indirect descriptors */
|
||||
ACRN_VIRTIO_RING_F_INDIRECT_DESC) /* indirect descriptors */
|
||||
|
||||
/*
|
||||
* Writeback cache bits
|
||||
@@ -214,7 +214,7 @@ virtio_blk_proc(struct virtio_blk *blk, struct virtio_vq_info *vq)
|
||||
assert(n >= 2 && n <= BLOCKIF_IOV_MAX + 2);
|
||||
|
||||
io = &blk->ios[idx];
|
||||
assert((flags[0] & VRING_DESC_F_WRITE) == 0);
|
||||
assert((flags[0] & ACRN_VRING_DESC_F_WRITE) == 0);
|
||||
assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr));
|
||||
vbh = iov[0].iov_base;
|
||||
memcpy(&io->req.iov, &iov[1], sizeof(struct iovec) * (n - 2));
|
||||
@@ -222,7 +222,7 @@ virtio_blk_proc(struct virtio_blk *blk, struct virtio_vq_info *vq)
|
||||
io->req.offset = vbh->sector * DEV_BSIZE;
|
||||
io->status = iov[--n].iov_base;
|
||||
assert(iov[n].iov_len == 1);
|
||||
assert(flags[n] & VRING_DESC_F_WRITE);
|
||||
assert(flags[n] & ACRN_VRING_DESC_F_WRITE);
|
||||
|
||||
/*
|
||||
* XXX
|
||||
@@ -240,7 +240,7 @@ virtio_blk_proc(struct virtio_blk *blk, struct virtio_vq_info *vq)
|
||||
* therefore test the inverse of the descriptor bit
|
||||
* to the op.
|
||||
*/
|
||||
assert(((flags[i] & VRING_DESC_F_WRITE) == 0) == writeop);
|
||||
assert(((flags[i] & ACRN_VRING_DESC_F_WRITE) == 0) == writeop);
|
||||
iolen += iov[i].iov_len;
|
||||
}
|
||||
io->req.resid = iolen;
|
||||
|
||||
Reference in New Issue
Block a user