search for: __virtioxx

Displaying 20 results from an estimated 25 matches for "__virtioxx".

Did you mean: __virtio16
2020 Aug 04
1
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...redhat.com> wrote: > Currently all config space fields are of the type __uXX. > This confuses people and some drivers (notably vdpa) > access them using CPU endian-ness - which only > works well for legacy or LE platforms. > > Update virtio_cread/virtio_cwrite macros to allow __virtioXX > and __leXX field types. Follow-up patches will convert > config space to use these types. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++-- > 1 file changed, 48 insertions(+), 2 de...
2020 Aug 03
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
Currently all config space fields are of the type __uXX. This confuses people and some drivers (notably vdpa) access them using CPU endian-ness - which only works well for legacy or LE platforms. Update virtio_cread/virtio_cwrite macros to allow __virtioXX and __leXX field types. Follow-up patches will convert config space to use these types. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/include/li...
2020 Aug 05
0
[PATCH v3 03/38] virtio: allow __virtioXX, __leXX in config space
Currently all config space fields are of the type __uXX. This confuses people and some drivers (notably vdpa) access them using CPU endian-ness - which only works well for legacy or LE platforms. Update virtio_cread/virtio_cwrite macros to allow __virtioXX and __leXX field types. Follow-up patches will convert config space to use these types. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> Acked-by: Cornelia Huck <cohuck at redhat.com> --- include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++-- 1 file changed, 48 i...
2020 Aug 05
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...t; Currently all config space fields are of the type __uXX. > > This confuses people and some drivers (notably vdpa) > > access them using CPU endian-ness - which only > > works well for legacy or LE platforms. > > > > Update virtio_cread/virtio_cwrite macros to allow __virtioXX > > and __leXX field types. Follow-up patches will convert > > config space to use these types. > > > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > --- > > include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++-- > > 1...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...chael S. Tsirkin wrote: > Currently all config space fields are of the type __uXX. > This confuses people and some drivers (notably vdpa) > access them using CPU endian-ness - which only > works well for legacy or LE platforms. > > Update virtio_cread/virtio_cwrite macros to allow __virtioXX > and __leXX field types. Follow-up patches will convert > config space to use these types. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++-- > 1 file changed, 48 insertions(+), 2 d...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...chael S. Tsirkin wrote: > Currently all config space fields are of the type __uXX. > This confuses people and some drivers (notably vdpa) > access them using CPU endian-ness - which only > works well for legacy or LE platforms. > > Update virtio_cread/virtio_cwrite macros to allow __virtioXX > and __leXX field types. Follow-up patches will convert > config space to use these types. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++-- > 1 file changed, 48 insertions(+), 2 d...
2020 Aug 06
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On Thu, Aug 06, 2020 at 11:37:38AM +0800, Jason Wang wrote: > > On 2020/8/5 ??7:45, Michael S. Tsirkin wrote: > > > > #define virtio_cread(vdev, structname, member, ptr) \ > > > > do { \ > > > > might_sleep(); \ > > > > /* Must match the member's type, and be integer */ \ > > > > - if
2020 Aug 06
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On 2020/8/5 ??7:45, Michael S. Tsirkin wrote: >>> #define virtio_cread(vdev, structname, member, ptr) \ >>> do { \ >>> might_sleep(); \ >>> /* Must match the member's type, and be integer */ \ >>> - if (!typecheck(typeof((((structname*)0)->member)), *(ptr))) \ >>> + if (!__virtio_typecheck(structname,
2020 Aug 06
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On 2020/8/5 ??7:45, Michael S. Tsirkin wrote: >>> #define virtio_cread(vdev, structname, member, ptr) \ >>> do { \ >>> might_sleep(); \ >>> /* Must match the member's type, and be integer */ \ >>> - if (!typecheck(typeof((((structname*)0)->member)), *(ptr))) \ >>> + if (!__virtio_typecheck(structname,
2020 Aug 04
1
[PATCH v2 17/24] virtio_config: disallow native type fields
On Mon, 3 Aug 2020 16:59:57 -0400 "Michael S. Tsirkin" <mst at redhat.com> wrote: > Transitional devices should all use __virtioXX types. I think they should use __leXX for those fields that are not present with legacy devices? > Modern ones should use __leXX. > _uXX type would be a bug. > Let's prevent that. That sounds right, though. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> >...
2018 Sep 07
2
[PATCH net-next v2 1/5] virtio: add packed ring definitions
...gt; +}; > + > +struct vring_packed_desc { > + /* Buffer Address. */ > + __virtio64 addr; > + /* Buffer Length. */ > + __virtio32 len; > + /* Buffer ID. */ > + __virtio16 id; > + /* The flags depending on descriptor type. */ > + __virtio16 flags; > +}; Don't use __virtioXX types, just __leXX ones. > + > +struct vring_packed { > + unsigned int num; > + > + struct vring_packed_desc *desc; > + > + struct vring_packed_desc_event *driver; > + > + struct vring_packed_desc_event *device; > +}; > + > #endif /* _UAPI_LINUX_VIRTIO_RING_H *...
2018 Sep 07
2
[PATCH net-next v2 1/5] virtio: add packed ring definitions
...gt; +}; > + > +struct vring_packed_desc { > + /* Buffer Address. */ > + __virtio64 addr; > + /* Buffer Length. */ > + __virtio32 len; > + /* Buffer ID. */ > + __virtio16 id; > + /* The flags depending on descriptor type. */ > + __virtio16 flags; > +}; Don't use __virtioXX types, just __leXX ones. > + > +struct vring_packed { > + unsigned int num; > + > + struct vring_packed_desc *desc; > + > + struct vring_packed_desc_event *driver; > + > + struct vring_packed_desc_event *device; > +}; > + > #endif /* _UAPI_LINUX_VIRTIO_RING_H *...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
...still TBD. I also start with a version using gcc extensions, then switch to _Generic. This is helpful for backports to older kernels/older distros: _Generic patch can just be skipped. Michael S. Tsirkin (24): virtio_balloon: fix sparse warning virtio_ring: sparse warning fixup virtio: allow __virtioXX, __leXX in config space virtio_9p: correct tags for config space fields virtio_balloon: correct tags for config space fields virtio_blk: correct tags for config space fields virtio_console: correct tags for config space fields virtio_crypto: correct tags for config space fields virtio_f...
2020 Aug 03
0
[PATCH v2 13/24] virtio_mem: correct tags for config space fields
Since this is a modern-only device, tag config space fields as having little endian-ness. TODO: check other uses of __virtioXX types in this header, should probably be __leXX. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/uapi/linux/virtio_mem.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_mem.h b/include/uapi/linux/virtio_mem.h ind...
2020 Aug 03
0
[PATCH v2 17/24] virtio_config: disallow native type fields
Transitional devices should all use __virtioXX types. Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_config.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/linux/virtio_config.h b/include/li...
2020 Aug 05
0
[PATCH v3 13/38] virtio_mem: correct tags for config space fields
Since this is a modern-only device, tag config space fields as having little endian-ness. TODO: check other uses of __virtioXX types in this header, should probably be __leXX. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> Acked-by: David Hildenbrand <david at redhat.com> Reviewed-by: Cornelia Huck <cohuck at redhat.com> --- include/uapi/linux/virtio_mem.h | 14 +++++++------- 1 file changed, 7 i...
2020 Aug 05
0
[PATCH v3 17/38] virtio_config: disallow native type fields
Transitional devices should all use __virtioXX types (and __leXX for fields not present in legacy devices). Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_config.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) d...
2020 Aug 05
0
[PATCH v3 25/38] virtio_config: disallow native type fields (again)
_Generic version allowed __uXX types but that is no longer necessary: Transitional devices should all use __virtioXX types (and __leXX for fields not present in the legacy devices). Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_config.h | 16 ++-------------- 1 file changed, 2 insertions(+), 1...
2014 Dec 01
0
[PATCH v8 32/50] vhost: switch to __get/__put_user exclusively
Most places in vhost can use __get/__put_user rather than get/put_user since addresses are pre-validated. This should be good for performance, but this also will help make code sparse-clean: get/put_user macros don't play well with __virtioXX bitwise tags. Switch to get/put_user to __ variants everywhere in vhost. There's one exception - for consistency switch that as well, and add an explicit access_ok check. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vhost/vhost.c | 13 ++++++++++--- 1 file changed,...
2014 Dec 01
0
[PATCH v8 32/50] vhost: switch to __get/__put_user exclusively
Most places in vhost can use __get/__put_user rather than get/put_user since addresses are pre-validated. This should be good for performance, but this also will help make code sparse-clean: get/put_user macros don't play well with __virtioXX bitwise tags. Switch to get/put_user to __ variants everywhere in vhost. There's one exception - for consistency switch that as well, and add an explicit access_ok check. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vhost/vhost.c | 13 ++++++++++--- 1 file changed,...