search for: vhost_vfio_op_hdr_size

Displaying 8 results from an estimated 8 matches for "vhost_vfio_op_hdr_size".

2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...ed to re-invent notifiy region at all and we can pass-through them to guest. Personally, I prefer vhost ioctl. > > Each message will be written to or read from this region at offset 0: > > int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) > { > int count = VHOST_VFIO_OP_HDR_SIZE + op->size; > struct vhost_vfio *vfio = dev->opaque; > int ret; > > ret = pwrite64(vfio->device_fd, op, count, vfio->config_offset); > if (ret != count) > return -1; > > return 0; > } > > int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfi...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...e; struct vhost_vring_addr addr; } payload; }; The existing vhost-kernel ioctl cmds are reused as the message requests in above structure. Each message will be written to or read from this region at offset 0: int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; int ret; ret = pwrite64(vfio->device_fd, op, count, vfio->config_offset); if (ret != count) return -1; return 0; } int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...e; struct vhost_vring_addr addr; } payload; }; The existing vhost-kernel ioctl cmds are reused as the message requests in above structure. Each message will be written to or read from this region at offset 0: int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; int ret; ret = pwrite64(vfio->device_fd, op, count, vfio->config_offset); if (ret != count) return -1; return 0; } int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...ddr; struct vhost_memory memory; } payload; }; The existing vhost-kernel ioctl cmds are reused as the message requests in above structure. Each message will be written to or read from this region at offset 0: int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; int ret; ret = pwrite64(vfio->device_fd, op, count, vfio->bar0_offset); if (ret != count) return -1; return 0; } int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op-&...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...ddr; struct vhost_memory memory; } payload; }; The existing vhost-kernel ioctl cmds are reused as the message requests in above structure. Each message will be written to or read from this region at offset 0: int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op->size; struct vhost_vfio *vfio = dev->opaque; int ret; ret = pwrite64(vfio->device_fd, op, count, vfio->bar0_offset); if (ret != count) return -1; return 0; } int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_op *op) { int count = VHOST_VFIO_OP_HDR_SIZE + op-&...
2018 Apr 10
0
[RFC] vhost: introduce mdev based hardware vhost backend
...}; > > The existing vhost-kernel ioctl cmds are reused as > the message requests in above structure. > > Each message will be written to or read from this > region at offset 0: > > int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) > { > int count = VHOST_VFIO_OP_HDR_SIZE + op->size; > struct vhost_vfio *vfio = dev->opaque; > int ret; > > ret = pwrite64(vfio->device_fd, op, count, vfio->bar0_offset); > if (ret != count) > return -1; > > return 0; > } > > int vhost_vfio_read(struct vhost_dev *dev, struct vhost_vfio_...
2018 Apr 10
4
[RFC] vhost: introduce mdev based hardware vhost backend
...tl cmds are reused as > > the message requests in above structure. > > > > Each message will be written to or read from this > > region at offset 0: > > > > int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) > > { > > int count = VHOST_VFIO_OP_HDR_SIZE + op->size; > > struct vhost_vfio *vfio = dev->opaque; > > int ret; > > > > ret = pwrite64(vfio->device_fd, op, count, vfio->bar0_offset); > > if (ret != count) > > return -1; > > > > return 0; > > } > > > > int...
2018 Apr 10
4
[RFC] vhost: introduce mdev based hardware vhost backend
...tl cmds are reused as > > the message requests in above structure. > > > > Each message will be written to or read from this > > region at offset 0: > > > > int vhost_vfio_write(struct vhost_dev *dev, struct vhost_vfio_op *op) > > { > > int count = VHOST_VFIO_OP_HDR_SIZE + op->size; > > struct vhost_vfio *vfio = dev->opaque; > > int ret; > > > > ret = pwrite64(vfio->device_fd, op, count, vfio->bar0_offset); > > if (ret != count) > > return -1; > > > > return 0; > > } > > > > int...