search for: virtio_queue_set_addr

Displaying 20 results from an estimated 49 matches for "virtio_queue_set_addr".

2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 8e665c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 8e665c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 21
0
[PATCHv6 07/12] qemu/virtio: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 8e665c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 21
0
[PATCHv6 07/12] qemu/virtio: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 8e665c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 May 25
0
[PATCH 09/11] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 02
0
[PATCHv2 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 05
0
[PATCHv3 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 May 25
0
[PATCH 09/11] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 02
0
[PATCHv2 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
2009 Jun 05
0
[PATCHv3 09/13] qemu: virtio support for many interrupt vectors
...rtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static...
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
...uite ugly. Can't we set desc/avail/used unconditionally, and drop the pa value? > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > index 68c40db..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...
2014 Dec 02
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...uite ugly. Can't we set desc/avail/used unconditionally, and drop the pa value? > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > index 68c40db..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...
2014 Dec 11
0
[PATCH RFC v6 11/20] s390x/virtio-ccw: support virtio-1 set_vq format
...alignment. */ - if (addr && (align != 4096)) { + if (linfo && desc && (linfo->align != 4096)) { return -EINVAL; } @@ -287,8 +299,12 @@ static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align, return -EINVAL; } - virtio_queue_set_addr(vdev, index, addr); - if (!addr) { + if (info) { + virtio_queue_set_rings(vdev, index, desc, info->avail, info->used); + } else { + virtio_queue_set_addr(vdev, index, desc); + } + if (!desc) { virtio_queue_set_vector(vdev, index, 0); } else {...
2014 Dec 11
0
[PATCH RFC v6 11/20] s390x/virtio-ccw: support virtio-1 set_vq format
...alignment. */ - if (addr && (align != 4096)) { + if (linfo && desc && (linfo->align != 4096)) { return -EINVAL; } @@ -287,8 +299,12 @@ static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align, return -EINVAL; } - virtio_queue_set_addr(vdev, index, addr); - if (!addr) { + if (info) { + virtio_queue_set_rings(vdev, index, desc, info->avail, info->used); + } else { + virtio_queue_set_addr(vdev, index, desc); + } + if (!desc) { virtio_queue_set_vector(vdev, index, 0); } else {...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...ail_idx = 0; - vdev->vq[i].pa = 0; vdev->vq[i].vector = VIRTIO_NO_VECTOR; vdev->vq[i].signalled_used = 0; vdev->vq[i].signalled_used_valid = false; @@ -708,13 +709,21 @@ void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data) void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr) { - vdev->vq[n].pa = addr; - virtqueue_init(&vdev->vq[n]); + vdev->vq[n].vring.desc = addr; + virtio_queue_update_rings(vdev, n); } hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n) { - return vdev->vq[n].pa; + re...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...ail_idx = 0; - vdev->vq[i].pa = 0; vdev->vq[i].vector = VIRTIO_NO_VECTOR; vdev->vq[i].signalled_used = 0; vdev->vq[i].signalled_used_valid = false; @@ -708,13 +709,21 @@ void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data) void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr) { - vdev->vq[n].pa = addr; - virtqueue_init(&vdev->vq[n]); + vdev->vq[n].vring.desc = addr; + virtio_queue_update_rings(vdev, n); } hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n) { - return vdev->vq[n].pa; + re...