Displaying 20 results from an estimated 22 matches for "__lexx".
Did you mean:
__le32
2020 Aug 04
1
[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(-)
(......
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/linux/virtio_...
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 insertions(+...
2020 Aug 05
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...pace 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 ins...
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 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...te:
> 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(-)
>...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...te:
> 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(-)
>...
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>
> ---
> include/linux/virtio_config....
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(-)
diff --git a/includ...
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(+), 14 deletions(-)
di...
2018 Sep 07
2
[PATCH net-next v2 1/5] virtio: add packed ring definitions
...ruct 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 */
> --
> 2.1...
2018 Sep 07
2
[PATCH net-next v2 1/5] virtio: add packed ring definitions
...ruct 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 */
> --
> 2.1...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
...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_fs: corre...
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
index a9ffe041843c..70e01c687d5e 100644
--- a/inclu...
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/linux/virtio_config.h
index 64da491936f...
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 insertions(+), 7 deletions(-)
diff --git a/inclu...
2018 Sep 10
0
[PATCH net-next v2 1/5] virtio: add packed ring definitions
...*/
> > + __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.
Got it, will do that.
>
> > +
> > +struct vring_packed {
> > + unsigned int num;
> > +
> > + struct vring_packed_desc *desc;
> > +
> > + struct vring_packed_desc_event *driver;
> > +
> > + struct vring_packed_desc_event *device;
>...
2020 Aug 11
1
[GIT PULL] virtio: features, fixes
...for rules with allow action
Michael S. Tsirkin (44):
virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM
virtio: virtio_has_iommu_quirk -> virtio_has_dma_quirk
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 field...