search for: virtio_queue_get_num

Displaying 20 results from an estimated 61 matches for "virtio_queue_get_num".

2013 Mar 29
8
[PATCH 0/3] virtio/vhost: Add checks for uninitialized VQs
.... This also includes a vhost specific check for uninitialized VQs in vhost_verify_ring_mappings() to avoid this same case. Please review. --nab Michael S. Tsirkin (1): virtio: add API to check that ring is setup Nicholas Bellinger (2): virtio-pci: Add virtio_queue_valid checks ahead of virtio_queue_get_num vhost: Check+skip uninitialized VQs in vhost_verify_ring_mappings hw/vhost.c | 3 +++ hw/virtio-pci.c | 27 +++++++++++++++++++++++++++ hw/virtio.c | 5 +++++ hw/virtio.h | 1 + 4 files changed, 36 insertions(+), 0 deletions(-) -- 1.7.2.5
2013 Mar 29
8
[PATCH 0/3] virtio/vhost: Add checks for uninitialized VQs
.... This also includes a vhost specific check for uninitialized VQs in vhost_verify_ring_mappings() to avoid this same case. Please review. --nab Michael S. Tsirkin (1): virtio: add API to check that ring is setup Nicholas Bellinger (2): virtio-pci: Add virtio_queue_valid checks ahead of virtio_queue_get_num vhost: Check+skip uninitialized VQs in vhost_verify_ring_mappings hw/vhost.c | 3 +++ hw/virtio-pci.c | 27 +++++++++++++++++++++++++++ hw/virtio.c | 5 +++++ hw/virtio.h | 1 + 4 files changed, 36 insertions(+), 0 deletions(-) -- 1.7.2.5
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > { > > + /* > > + * For virtio-1 devices, the number of buffers may only be > > + * updated if the ring addresses have
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > { > > + /* > > + * For virtio-1 devices, the number of buffers may only be > > + * updated if the ring addresses have
2014 Dec 02
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...include/hw/virtio/virtio.h > +++ b/include/hw/virtio/virtio.h > @@ -224,6 +224,8 @@ void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr); > hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n); > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num); > int virtio_queue_get_num(VirtIODevice *vdev, int n); > +void virtio_queue_set_rings(VirtIODevice *vdev, int n, hwaddr desc, > + hwaddr avail, hwaddr used); > void virtio_queue_set_align(VirtIODevice *vdev, int n, int align); > void virtio_queue_notify(VirtIODevice *vdev, int n); &gt...
2014 Dec 02
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...include/hw/virtio/virtio.h > +++ b/include/hw/virtio/virtio.h > @@ -224,6 +224,8 @@ void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr); > hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n); > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num); > int virtio_queue_get_num(VirtIODevice *vdev, int n); > +void virtio_queue_set_rings(VirtIODevice *vdev, int n, hwaddr desc, > + hwaddr avail, hwaddr used); > void virtio_queue_set_align(VirtIODevice *vdev, int n, int align); > void virtio_queue_notify(VirtIODevice *vdev, int n); &gt...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...vdev->vq[n].vring.used = used; } void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) @@ -728,7 +737,6 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) return; } vdev->vq[n].vring.num = num; - virtqueue_init(&vdev->vq[n]); } int virtio_queue_get_num(VirtIODevice *vdev, int n) @@ -748,6 +756,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); + /* virtio-1 compliant devices cannot change the aligment */ + if...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...vdev->vq[n].vring.used = used; } void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) @@ -728,7 +737,6 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) return; } vdev->vq[n].vring.num = num; - virtqueue_init(&vdev->vq[n]); } int virtio_queue_get_num(VirtIODevice *vdev, int n) @@ -748,6 +756,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); + /* virtio-1 compliant devices cannot change the aligment */ + if...
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...vdev->vq[n].vring.used = used; } void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) @@ -728,7 +737,6 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) return; } vdev->vq[n].vring.num = num; - virtqueue_init(&vdev->vq[n]); } int virtio_queue_get_num(VirtIODevice *vdev, int n) @@ -748,6 +756,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); + /* virtio-1 compliant devices cannot change the aligment */ + if...
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...vdev->vq[n].vring.used = used; } void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) @@ -728,7 +737,6 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) return; } vdev->vq[n].vring.num = num; - virtqueue_init(&vdev->vq[n]); } int virtio_queue_get_num(VirtIODevice *vdev, int n) @@ -748,6 +756,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); + /* virtio-1 compliant devices cannot change the aligment */ + if...
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...tof(struct virtio_pci_common_cfg, device_status): + return vdev->status; + + /* About a specific virtqueue. */ + case offsetof(struct virtio_pci_common_cfg, queue_select): + return vdev->queue_sel; + case offsetof(struct virtio_pci_common_cfg, queue_size): + return virtio_queue_get_num(vdev, vdev->queue_sel); + case offsetof(struct virtio_pci_common_cfg, queue_msix_vector): + return virtio_queue_vector(vdev, vdev->queue_sel); + case offsetof(struct virtio_pci_common_cfg, queue_enable): + /* TODO */ + return 0; + case offsetof(struct virtio_pci_common_cfg, qu...
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...tof(struct virtio_pci_common_cfg, device_status): + return vdev->status; + + /* About a specific virtqueue. */ + case offsetof(struct virtio_pci_common_cfg, queue_select): + return vdev->queue_sel; + case offsetof(struct virtio_pci_common_cfg, queue_size): + return virtio_queue_get_num(vdev, vdev->queue_sel); + case offsetof(struct virtio_pci_common_cfg, queue_msix_vector): + return virtio_queue_vector(vdev, vdev->queue_sel); + case offsetof(struct virtio_pci_common_cfg, queue_enable): + /* TODO */ + return 0; + case offsetof(struct virtio_pci_common_cfg, qu...
2014 Dec 02
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...tent states, or to set it to an invalid size. */ @@ -728,7 +744,7 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) return; } vdev->vq[n].vring.num = num; - virtqueue_init(&vdev->vq[n]); + virtqueue_update_rings(&vdev->vq[n]); } int virtio_queue_get_num(VirtIODevice *vdev, int n) @@ -748,6 +764,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); + /* virtio-1 compliant devices cannot change the aligment */ + if...
2014 Dec 02
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...tent states, or to set it to an invalid size. */ @@ -728,7 +744,7 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) return; } vdev->vq[n].vring.num = num; - virtqueue_init(&vdev->vq[n]); + virtqueue_update_rings(&vdev->vq[n]); } int virtio_queue_get_num(VirtIODevice *vdev, int n) @@ -748,6 +764,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); + /* virtio-1 compliant devices cannot change the aligment */ + if...
2013 May 28
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...evice_status): > + return vdev->status; > + > + /* About a specific virtqueue. */ > + case offsetof(struct virtio_pci_common_cfg, queue_select): > + return vdev->queue_sel; > + case offsetof(struct virtio_pci_common_cfg, queue_size): > + return virtio_queue_get_num(vdev, vdev->queue_sel); > + case offsetof(struct virtio_pci_common_cfg, queue_msix_vector): > + return virtio_queue_vector(vdev, vdev->queue_sel); > + case offsetof(struct virtio_pci_common_cfg, queue_enable): > + /* TODO */ > + return 0; > + case offsetof(st...
2014 Dec 02
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...db..80ee313 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -224,6 +224,8 @@ void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr); hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n); void virtio_queue_set_num(VirtIODevice *vdev, int n, int num); int virtio_queue_get_num(VirtIODevice *vdev, int n); +void virtio_queue_set_rings(VirtIODevice *vdev, int n, hwaddr desc, + hwaddr avail, hwaddr used); void virtio_queue_set_align(VirtIODevice *vdev, int n, int align); void virtio_queue_notify(VirtIODevice *vdev, int n); uint16_t virtio_queue_...
2014 Dec 02
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...db..80ee313 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -224,6 +224,8 @@ void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr); hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n); void virtio_queue_set_num(VirtIODevice *vdev, int n, int num); int virtio_queue_get_num(VirtIODevice *vdev, int n); +void virtio_queue_set_rings(VirtIODevice *vdev, int n, hwaddr desc, + hwaddr avail, hwaddr used); void virtio_queue_set_align(VirtIODevice *vdev, int n, int align); void virtio_queue_notify(VirtIODevice *vdev, int n); uint16_t virtio_queue_...
2015 Jan 22
2
[Qemu-devel] [PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...; void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > @@ -728,7 +737,6 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > return; > } > vdev->vq[n].vring.num = num; > - virtqueue_init(&vdev->vq[n]); > } > > int virtio_queue_get_num(VirtIODevice *vdev, int n) > @@ -748,6 +756,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) > BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); > VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); > > + /* virtio-1 compliant devices cannot change...
2015 Jan 22
2
[Qemu-devel] [PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...; void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > @@ -728,7 +737,6 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > return; > } > vdev->vq[n].vring.num = num; > - virtqueue_init(&vdev->vq[n]); > } > > int virtio_queue_get_num(VirtIODevice *vdev, int n) > @@ -748,6 +756,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) > BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); > VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); > > + /* virtio-1 compliant devices cannot change...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...; void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > @@ -728,7 +737,6 @@ void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > return; > } > vdev->vq[n].vring.num = num; > - virtqueue_init(&vdev->vq[n]); > } > > int virtio_queue_get_num(VirtIODevice *vdev, int n) > @@ -748,6 +756,11 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align) > BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); > VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); > > + /* virtio-1 compliant devices cannot change...