search for: __virtio_has_feature

Displaying 20 results from an estimated 27 matches for "__virtio_has_feature".

2015 May 12
4
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz <gkurz at linux.vnet.ibm.com> wrote: > Unlike with add and clear, there is no valid reason to abort when checking > for a feature. It makes more sense to return false (i.e. the feature bit > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > This allows to introduce code that is aware about new 64-bit features like > VIRTIO_F_VERSION_1, even if they are still not implemented. > > Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com> > --- > include/hw/virtio/virtio.h | 1 -...
2015 May 12
4
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz <gkurz at linux.vnet.ibm.com> wrote: > Unlike with add and clear, there is no valid reason to abort when checking > for a feature. It makes more sense to return false (i.e. the feature bit > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > This allows to introduce code that is aware about new 64-bit features like > VIRTIO_F_VERSION_1, even if they are still not implemented. > > Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com> > --- > include/hw/virtio/virtio.h | 1 -...
2014 Dec 11
3
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...t; index 2fede2e..f6c0379 100644 > --- a/include/hw/virtio/virtio.h > +++ b/include/hw/virtio/virtio.h > @@ -278,6 +278,17 @@ static inline void virtio_clear_feature(uint32_t *features, unsigned int fbit) > *features &= ~(1 << fbit); > } > > +static inline bool __virtio_has_feature(uint32_t features, unsigned int fbit) > +{ > + assert(fbit < 32); > + return !!(features & (1 << fbit)); > +} > + > +static inline bool virtio_has_feature(VirtIODevice *vdev, unsigned int fbit) > +{ > + return __virtio_has_feature(vdev->guest_feature...
2014 Dec 11
3
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...t; index 2fede2e..f6c0379 100644 > --- a/include/hw/virtio/virtio.h > +++ b/include/hw/virtio/virtio.h > @@ -278,6 +278,17 @@ static inline void virtio_clear_feature(uint32_t *features, unsigned int fbit) > *features &= ~(1 << fbit); > } > > +static inline bool __virtio_has_feature(uint32_t features, unsigned int fbit) > +{ > + assert(fbit < 32); > + return !!(features & (1 << fbit)); > +} > + > +static inline bool virtio_has_feature(VirtIODevice *vdev, unsigned int fbit) > +{ > + return __virtio_has_feature(vdev->guest_feature...
2015 May 12
2
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
...> Greg Kurz <gkurz at linux.vnet.ibm.com> wrote: > > > > > Unlike with add and clear, there is no valid reason to abort when checking > > > for a feature. It makes more sense to return false (i.e. the feature bit > > > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > > > > > This allows to introduce code that is aware about new 64-bit features like > > > VIRTIO_F_VERSION_1, even if they are still not implemented. > > > > > > Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com> &...
2015 May 12
2
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
...> Greg Kurz <gkurz at linux.vnet.ibm.com> wrote: > > > > > Unlike with add and clear, there is no valid reason to abort when checking > > > for a feature. It makes more sense to return false (i.e. the feature bit > > > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > > > > > This allows to introduce code that is aware about new 64-bit features like > > > VIRTIO_F_VERSION_1, even if they are still not implemented. > > > > > > Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com> &...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...E; @@ -519,9 +519,12 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) VirtIONet *n = VIRTIO_NET(vdev); int i; - virtio_net_set_multiqueue(n, !!(features & (1 << VIRTIO_NET_F_MQ))); + virtio_net_set_multiqueue(n, + __virtio_has_feature(features, VIRTIO_NET_F_MQ)); - virtio_net_set_mrg_rx_bufs(n, !!(features & (1 << VIRTIO_NET_F_MRG_RXBUF))); + virtio_net_set_mrg_rx_bufs(n, + __virtio_has_feature(features, + VIRTIO_NET_F_MRG_RXBUF));...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...E; @@ -519,9 +519,12 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) VirtIONet *n = VIRTIO_NET(vdev); int i; - virtio_net_set_multiqueue(n, !!(features & (1 << VIRTIO_NET_F_MQ))); + virtio_net_set_multiqueue(n, + __virtio_has_feature(features, VIRTIO_NET_F_MQ)); - virtio_net_set_mrg_rx_bufs(n, !!(features & (1 << VIRTIO_NET_F_MRG_RXBUF))); + virtio_net_set_mrg_rx_bufs(n, + __virtio_has_feature(features, + VIRTIO_NET_F_MRG_RXBUF));...
2015 May 12
1
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
...ibm.com> wrote: > > > > > > > > > Unlike with add and clear, there is no valid reason to abort when checking > > > > > for a feature. It makes more sense to return false (i.e. the feature bit > > > > > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > > > > > > > > > This allows to introduce code that is aware about new 64-bit features like > > > > > VIRTIO_F_VERSION_1, even if they are still not implemented. > > > > > > > > > > Signed-off-b...
2015 May 12
1
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
...ibm.com> wrote: > > > > > > > > > Unlike with add and clear, there is no valid reason to abort when checking > > > > > for a feature. It makes more sense to return false (i.e. the feature bit > > > > > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > > > > > > > > > This allows to introduce code that is aware about new 64-bit features like > > > > > VIRTIO_F_VERSION_1, even if they are still not implemented. > > > > > > > > > > Signed-off-b...
2015 May 06
0
[PATCH RFC 1/7] virtio: relax feature check
Unlike with add and clear, there is no valid reason to abort when checking for a feature. It makes more sense to return false (i.e. the feature bit isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. This allows to introduce code that is aware about new 64-bit features like VIRTIO_F_VERSION_1, even if they are still not implemented. Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com> --- include/hw/virtio/virtio.h | 1 - 1 file changed, 1 deletion(-) dif...
2015 May 12
0
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
...2015 14:07:37 +0200 > Greg Kurz <gkurz at linux.vnet.ibm.com> wrote: > > > Unlike with add and clear, there is no valid reason to abort when checking > > for a feature. It makes more sense to return false (i.e. the feature bit > > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > > > This allows to introduce code that is aware about new 64-bit features like > > VIRTIO_F_VERSION_1, even if they are still not implemented. > > > > Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com> > > --- > > i...
2014 Dec 11
0
[PATCH RFC v6 16/20] virtio-net: support longer header
...sizeof(struct virtio_net_hdr); + } for (i = 0; i < n->max_queues; i++) { nc = qemu_get_subqueue(n->nic, i); @@ -525,7 +531,9 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features) virtio_net_set_mrg_rx_bufs(n, __virtio_has_feature(features, - VIRTIO_NET_F_MRG_RXBUF)); + VIRTIO_NET_F_MRG_RXBUF), + __virtio_has_feature(features, + VIRTIO_F_VERSION...
2014 Dec 11
0
[PATCH RFC v6 16/20] virtio-net: support longer header
...sizeof(struct virtio_net_hdr); + } for (i = 0; i < n->max_queues; i++) { nc = qemu_get_subqueue(n->nic, i); @@ -525,7 +531,9 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features) virtio_net_set_mrg_rx_bufs(n, __virtio_has_feature(features, - VIRTIO_NET_F_MRG_RXBUF)); + VIRTIO_NET_F_MRG_RXBUF), + __virtio_has_feature(features, + VIRTIO_F_VERSION...
2015 May 12
0
[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check
...gkurz at linux.vnet.ibm.com> wrote: > > > > > > > Unlike with add and clear, there is no valid reason to abort when checking > > > > for a feature. It makes more sense to return false (i.e. the feature bit > > > > isn't set). This is exactly what __virtio_has_feature() does if fbit >= 32. > > > > > > > > This allows to introduce code that is aware about new 64-bit features like > > > > VIRTIO_F_VERSION_1, even if they are still not implemented. > > > > > > > > Signed-off-by: Greg Kurz <gkurz at...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...t; > --- a/include/hw/virtio/virtio.h > > +++ b/include/hw/virtio/virtio.h > > @@ -278,6 +278,17 @@ static inline void virtio_clear_feature(uint32_t *features, unsigned int fbit) > > *features &= ~(1 << fbit); > > } > > > > +static inline bool __virtio_has_feature(uint32_t features, unsigned int fbit) > > +{ > > + assert(fbit < 32); > > + return !!(features & (1 << fbit)); > > +} > > + > > +static inline bool virtio_has_feature(VirtIODevice *vdev, unsigned int fbit) > > +{ > > + return __v...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...t; > --- a/include/hw/virtio/virtio.h > > +++ b/include/hw/virtio/virtio.h > > @@ -278,6 +278,17 @@ static inline void virtio_clear_feature(uint32_t *features, unsigned int fbit) > > *features &= ~(1 << fbit); > > } > > > > +static inline bool __virtio_has_feature(uint32_t features, unsigned int fbit) > > +{ > > + assert(fbit < 32); > > + return !!(features & (1 << fbit)); > > +} > > + > > +static inline bool virtio_has_feature(VirtIODevice *vdev, unsigned int fbit) > > +{ > > + return __v...
2015 May 06
9
[PATCH RFC 0/7] vhost: cross-endian support (vhost-net only)
Hi, This series allows QEMU to use vhost with legacy virtio devices when host and target don't have the same endianness. Only network devices are covered for the moment. I had already posted a series some monthes ago but it never got reviewed. Moreover, the underlying kernel support was entirely re-written and is still waiting to be applied by Michael. I hence post as RFC. The corresponding
2015 May 06
9
[PATCH RFC 0/7] vhost: cross-endian support (vhost-net only)
Hi, This series allows QEMU to use vhost with legacy virtio devices when host and target don't have the same endianness. Only network devices are covered for the moment. I had already posted a series some monthes ago but it never got reviewed. Moreover, the underlying kernel support was entirely re-written and is still waiting to be applied by Michael. I hence post as RFC. The corresponding
2014 Dec 02
24
[PATCH RFC v5 00/19] qemu: towards virtio-1 host support
Another iteration of virtio-1 patches for qemu, as always available on git://github.com/cohuck/qemu virtio-1 This one seems to work together with the current vhost-next patches (well, I can ping :) Changes from v4: - add helpers for feature bit manipulation and checking - use 64 bit feature bits instead of 32 bit arrays - infrastructure to allow devices to offer different sets of feature bits