Displaying 20 results from an estimated 70 matches for "qbus".
Did you mean:
bus
2014 Dec 03
1
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...call virtio_queue_update_rings from virtio_queue_set_align?
>
> You're right, set_align is legacy only so we can always call
> update_rings.
>
>
> > > @@ -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 (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > > + e...
2014 Dec 03
1
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...call virtio_queue_update_rings from virtio_queue_set_align?
>
> You're right, set_align is legacy only so we can always call
> update_rings.
>
>
> > > @@ -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 (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > > + e...
2016 Apr 21
4
[PATCH V2 RFC] fixup! virtio: convert to use DMA api
...ons(-)
diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
index 967cc75..bb6f34e 100644
--- a/include/hw/virtio/virtio-access.h
+++ b/include/hw/virtio/virtio-access.h
@@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
- if (k->get_dma_as) {
+ if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM) &&
+ k->get_dma_as) {
return k->get_dma_as(qbus->parent);
}
return &...
2016 Apr 21
4
[PATCH V2 RFC] fixup! virtio: convert to use DMA api
...ons(-)
diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
index 967cc75..bb6f34e 100644
--- a/include/hw/virtio/virtio-access.h
+++ b/include/hw/virtio/virtio-access.h
@@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
- if (k->get_dma_as) {
+ if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM) &&
+ k->get_dma_as) {
return k->get_dma_as(qbus->parent);
}
return &...
2014 Dec 12
2
[PATCH RFC v6 12/20] virtio: disallow late feature changes for virtio-1
...gt;
> -int virtio_set_features(VirtIODevice *vdev, uint64_t val)
> +static int __virtio_set_features(VirtIODevice *vdev, uint64_t val)
Maybe avoid the double underscores here? But unfortunately, I also fail
to come up with a better suggestion for a name here ...
> {
> BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> VirtioBusClass *vbusk = VIRTIO_BUS_GET_CLASS(qbus);
> @@ -994,6 +994,18 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val)
> return bad ? -1 : 0;
> }
>
> +int virtio_set_features(VirtIODevice *vdev, uint64_t val)
> +{...
2014 Dec 12
2
[PATCH RFC v6 12/20] virtio: disallow late feature changes for virtio-1
...gt;
> -int virtio_set_features(VirtIODevice *vdev, uint64_t val)
> +static int __virtio_set_features(VirtIODevice *vdev, uint64_t val)
Maybe avoid the double underscores here? But unfortunately, I also fail
to come up with a better suggestion for a name here ...
> {
> BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> VirtioBusClass *vbusk = VIRTIO_BUS_GET_CLASS(qbus);
> @@ -994,6 +994,18 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val)
> return bad ? -1 : 0;
> }
>
> +int virtio_set_features(VirtIODevice *vdev, uint64_t val)
> +{...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...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 (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> + error_report("tried to modify queue alignment...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...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 (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> + error_report("tried to modify queue alignment...
2016 Apr 21
1
[PATCH V2 RFC] fixup! virtio: convert to use DMA api
...ss.h b/include/hw/virtio/virtio-access.h
> > index 967cc75..bb6f34e 100644
> > --- a/include/hw/virtio/virtio-access.h
> > +++ b/include/hw/virtio/virtio-access.h
> > @@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
> > BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> > VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
> >
> > - if (k->get_dma_as) {
> > + if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM) &&
> > + k->get_dma_as) {
> > retur...
2016 Apr 21
1
[PATCH V2 RFC] fixup! virtio: convert to use DMA api
...ss.h b/include/hw/virtio/virtio-access.h
> > index 967cc75..bb6f34e 100644
> > --- a/include/hw/virtio/virtio-access.h
> > +++ b/include/hw/virtio/virtio-access.h
> > @@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
> > BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> > VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
> >
> > - if (k->get_dma_as) {
> > + if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM) &&
> > + k->get_dma_as) {
> > retur...
2014 Dec 11
0
[PATCH RFC v6 12/20] virtio: disallow late feature changes for virtio-1
...+++ b/hw/virtio/virtio.c
@@ -978,7 +978,7 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f)
vmstate_save_state(f, &vmstate_virtio, vdev);
}
-int virtio_set_features(VirtIODevice *vdev, uint64_t val)
+static int __virtio_set_features(VirtIODevice *vdev, uint64_t val)
{
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *vbusk = VIRTIO_BUS_GET_CLASS(qbus);
@@ -994,6 +994,18 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val)
return bad ? -1 : 0;
}
+int virtio_set_features(VirtIODevice *vdev, uint64_t val)
+{
+ /*
+ * The driver must no...
2014 Dec 11
0
[PATCH RFC v6 12/20] virtio: disallow late feature changes for virtio-1
...+++ b/hw/virtio/virtio.c
@@ -978,7 +978,7 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f)
vmstate_save_state(f, &vmstate_virtio, vdev);
}
-int virtio_set_features(VirtIODevice *vdev, uint64_t val)
+static int __virtio_set_features(VirtIODevice *vdev, uint64_t val)
{
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *vbusk = VIRTIO_BUS_GET_CLASS(qbus);
@@ -994,6 +994,18 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val)
return bad ? -1 : 0;
}
+int virtio_set_features(VirtIODevice *vdev, uint64_t val)
+{
+ /*
+ * The driver must no...
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...e == 0) {
>
> Let's just call virtio_queue_update_rings from virtio_queue_set_align?
You're right, set_align is legacy only so we can always call
update_rings.
> > @@ -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 (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > + error_report("tried t...
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...e == 0) {
>
> Let's just call virtio_queue_update_rings from virtio_queue_set_align?
You're right, set_align is legacy only so we can always call
update_rings.
> > @@ -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 (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > + error_report("tried t...
2016 Apr 21
0
[PATCH V2 RFC] fixup! virtio: convert to use DMA api
...ude/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
> index 967cc75..bb6f34e 100644
> --- a/include/hw/virtio/virtio-access.h
> +++ b/include/hw/virtio/virtio-access.h
> @@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
> BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
>
> - if (k->get_dma_as) {
> + if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM) &&
> + k->get_dma_as) {
> return k->get_dma_as(qbus->pa...
2016 Apr 21
0
[PATCH V2 RFC] fixup! virtio: convert to use DMA api
...ude/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
> index 967cc75..bb6f34e 100644
> --- a/include/hw/virtio/virtio-access.h
> +++ b/include/hw/virtio/virtio-access.h
> @@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
> BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
>
> - if (k->get_dma_as) {
> + if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM) &&
> + k->get_dma_as) {
> return k->get_dma_as(qbus->pa...
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
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
...ons(-)
diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
index 967cc75..bb6f34e 100644
--- a/include/hw/virtio/virtio-access.h
+++ b/include/hw/virtio/virtio-access.h
@@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
- if (k->get_dma_as) {
+ if ((vdev->host_features & (0x1ULL << VIRTIO_F_IOMMU_PLATFORM)) &&
+ k->get_dma_as) {
return k->get_dma_as(qbus->parent);...
2016 Apr 18
2
[PATCH RFC] fixup! virtio: convert to use DMA api
...ons(-)
diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
index 967cc75..bb6f34e 100644
--- a/include/hw/virtio/virtio-access.h
+++ b/include/hw/virtio/virtio-access.h
@@ -23,7 +23,8 @@ static inline AddressSpace *virtio_get_dma_as(VirtIODevice *vdev)
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
- if (k->get_dma_as) {
+ if ((vdev->host_features & (0x1ULL << VIRTIO_F_IOMMU_PLATFORM)) &&
+ k->get_dma_as) {
return k->get_dma_as(qbus->parent);...