search for: virtio_tswap16

Displaying 20 results from an estimated 29 matches for "virtio_tswap16".

2014 Oct 07
0
[PATCH RFC 07/11] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Oct 07
0
[PATCH RFC 07/11] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Nov 25
0
[PATCH RFC v2 07/12] dataplane: allow virtio-1 devices
..., VirtQueueElement *elem, > +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, > struct vring_desc *desc) > { > unsigned *num; > struct iovec *iov; > hwaddr *addr; > MemoryRegion *mr; > + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; > + uint32_t len = virtio_tswap32(vdev, desc->len); > + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); > > - if (desc->flags & VRING_DESC_F_WRITE) { > + if (is_write) { > num = &elem-&gt...
2014 Dec 11
0
[PATCH RFC v6 08/20] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Dec 11
0
[PATCH RFC v6 08/20] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Nov 26
0
[PATCH RFC v3 07/12] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Nov 26
0
[PATCH RFC v3 07/12] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Nov 25
1
[PATCH RFC v2 07/12] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Nov 25
1
[PATCH RFC v2 07/12] dataplane: allow virtio-1 devices
...} -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num; iov = &...
2014 Oct 28
1
[Qemu-devel] [PATCH RFC 07/11] dataplane: allow virtio-1 devices
..., VirtQueueElement *elem, > +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, > struct vring_desc *desc) > { > unsigned *num; > struct iovec *iov; > hwaddr *addr; > MemoryRegion *mr; > + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; > + uint32_t len = virtio_tswap32(vdev, desc->len); > + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); > > - if (desc->flags & VRING_DESC_F_WRITE) { > + if (is_write) { > num = &elem-&gt...
2014 Oct 28
1
[Qemu-devel] [PATCH RFC 07/11] dataplane: allow virtio-1 devices
..., VirtQueueElement *elem, > +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, > struct vring_desc *desc) > { > unsigned *num; > struct iovec *iov; > hwaddr *addr; > MemoryRegion *mr; > + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; > + uint32_t len = virtio_tswap32(vdev, desc->len); > + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); > > - if (desc->flags & VRING_DESC_F_WRITE) { > + if (is_write) { > num = &elem-&gt...
2014 Nov 25
15
[PATCH RFC v2 00/12] qemu: towards virtio-1 host support
Hi, here's the next version of my virtio-1 qemu patchset. Using virtio-1 virtio-blk and virtio-net devices with a guest kernel built from <1416829787-14252-1-git-send-email-mst at redhat.com> still seems to work for the virtio-ccw transport. Changes from v1: - rebased against current master - don't advertise VERSION_1 for all devices, make devices switch it on individually
2014 Nov 25
15
[PATCH RFC v2 00/12] qemu: towards virtio-1 host support
Hi, here's the next version of my virtio-1 qemu patchset. Using virtio-1 virtio-blk and virtio-net devices with a guest kernel built from <1416829787-14252-1-git-send-email-mst at redhat.com> still seems to work for the virtio-ccw transport. Changes from v1: - rebased against current master - don't advertise VERSION_1 for all devices, make devices switch it on individually
2014 Nov 26
15
[PATCH RFC v3 00/12] qemu: towards virtio-1 host support
Next version of virtio-1 patches for qemu. Only change from v2 is splitting out the vring accessors into a separate header file - should hopefully fix the build issues. Cornelia Huck (9): virtio: cull virtio_bus_set_vdev_features virtio: support more feature bits s390x/virtio-ccw: fix check for WRITE_FEAT virtio: introduce legacy virtio devices virtio: allow virtio-1 queue layout
2014 Nov 26
15
[PATCH RFC v3 00/12] qemu: towards virtio-1 host support
Next version of virtio-1 patches for qemu. Only change from v2 is splitting out the vring accessors into a separate header file - should hopefully fix the build issues. Cornelia Huck (9): virtio: cull virtio_bus_set_vdev_features virtio: support more feature bits s390x/virtio-ccw: fix check for WRITE_FEAT virtio: introduce legacy virtio devices virtio: allow virtio-1 queue layout
2015 Apr 12
2
[PATCH 1/2] virtio_balloon: header update for virtio 1
add modern header. This patch is for virtio 1.0 branch, doesn't apply to master. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/hw/virtio/virtio-balloon.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-balloon.h index f863bfe..79eca67 100644 --- a/include/hw/virtio/virtio-balloon.h +++
2015 Apr 12
2
[PATCH 1/2] virtio_balloon: header update for virtio 1
add modern header. This patch is for virtio 1.0 branch, doesn't apply to master. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/hw/virtio/virtio-balloon.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-balloon.h index f863bfe..79eca67 100644 --- a/include/hw/virtio/virtio-balloon.h +++
2014 Oct 07
18
[PATCH RFC 00/11] qemu: towards virtio-1 host support
This patchset aims to get us some way to implement virtio-1 compliant and transitional devices in qemu. Branch available at git://github.com/cohuck/qemu virtio-1 I've mainly focused on: - endianness handling - extended feature bits - virtio-ccw new/changed commands Thanks go to Thomas for some preliminary work in this area. I've been able to start guests both with and without the
2014 Oct 07
18
[PATCH RFC 00/11] qemu: towards virtio-1 host support
This patchset aims to get us some way to implement virtio-1 compliant and transitional devices in qemu. Branch available at git://github.com/cohuck/qemu virtio-1 I've mainly focused on: - endianness handling - extended feature bits - virtio-ccw new/changed commands Thanks go to Thomas for some preliminary work in this area. I've been able to start guests both with and without the
2015 Apr 13
3
[PATCH 2/2] virtio-balloon: virtio 1 support
...53,14 +254,28 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq) > */ > reset_stats(s); > > - while (iov_to_buf(elem->out_sg, elem->out_num, offset, &stat, sizeof(stat)) > - == sizeof(stat)) { > - uint16_t tag = virtio_tswap16(vdev, stat.tag); > - uint64_t val = virtio_tswap64(vdev, stat.val); > + if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { > + while (iov_to_buf(elem->out_sg, elem->out_num, offset, > + &modern_stat, sizeof(modern_stat)) > +...