Displaying 20 results from an estimated 500 matches similar to: "[PATCH v3 26/38] virtio_config: LE config space accessors"
2020 Aug 05
0
[PATCH v3 24/38] virtio_config: rewrite using _Generic
Min compiler version has been raised, so that's ok now.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
include/linux/virtio_config.h | 163 ++++++++++++++++------------------
1 file changed, 77 insertions(+), 86 deletions(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 5c3b02245ecd..7fa000f02721 100644
--- a/include/linux/virtio_config.h
2020 Aug 05
1
[vhost:vhost 32/52] include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head: 4c05433bc6fb4ae172270f0279be8ba89a3da64f
commit: b025584098e621d88894d28e80af686958e273af [32/52] virtio_input: convert to LE accessors
config: parisc-randconfig-r003-20200805 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
2020 Aug 06
0
[vhost:vhost 32/65] drivers/virtio/virtio_input.c:247:3: warning: comparison of distinct pointer types ('typeof (_Generic((virtio_cread_v), __u8: (virtio_cread_v), __le16: (__builtin_constant_p((__u16)((__u16)(__le16)(virtio_cread_v)))
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head: 1a86b377aa2147a7c866b03142e848c18e5f3cb8
commit: b025584098e621d88894d28e80af686958e273af [32/65] virtio_input: convert to LE accessors
config: powerpc-randconfig-r031-20200805 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 076b120bebfd727b502208601012a44ab2e1028e)
2020 Aug 05
0
[PATCH v3 37/38] virtio_config: drop LE option from config space
All drivers now use virtio_cread/write_le for LE config
space fields. Drop LE option from virtio_cread/write, only leaving
the option to access transitional fields.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
include/linux/virtio_config.h | 28 ++--------------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/include/linux/virtio_config.h
2020 Aug 05
0
[PATCH v3 28/38] virtio_config: add virtio_cread_le_feature
Mirrors virtio_cread_feature but for LE fields.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
include/linux/virtio_config.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 5b5196fec899..cc7a2b1fd7b2 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -555,4 +555,14
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are
not tagged with the correct endian-ness so it's easy
to make mistakes like instanciating config space in
native endian-ness.
The following patches adding sparse tagging are currently in my tree.
Lightly tested.
As a follow-up, I plan to add new APIs that handle modern config space
in a more efficient way (bypassing the version check).
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
2020 Aug 05
1
[PATCH v3 30/38] virtio_input: convert to LE accessors
Virtio input is modern-only. Use LE accessors for config space.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/virtio/virtio_input.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
index efaf65b0f42d..877b2ea3ed05 100644
--- a/drivers/virtio/virtio_input.c
2020 Aug 05
1
[PATCH v3 34/38] drm/virtio: convert to LE accessors
Virtgpu is modern-only. Use LE accessors for config space.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/gpu/drm/virtio/virtgpu_kms.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c
index 0a5c8cf409fb..4d944a0dff3e 100644
---
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
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
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On 2020/8/4 ??4:58, Michael 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
>
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On 2020/8/4 ??4:58, Michael 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
>
2020 Aug 05
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On Wed, Aug 05, 2020 at 02:28:23PM +0800, Jason Wang wrote:
>
> On 2020/8/4 ??4:58, Michael 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
2020 Aug 05
0
[PATCH v3 29/38] virtio_balloon: use LE config space accesses
Balloon is LE, it's cleaner to access it as such directly.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/virtio/virtio_balloon.c | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 8bc1704ffdf3..31cc97f2f515 100644
--- a/drivers/virtio/virtio_balloon.c
2015 Mar 31
2
[PATCH] virtio_config: reorder functions
This simply reorders functions in virtio_config
so width access wrapper helpers are all together.
Drops an extra empty line while we are at it.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
include/linux/virtio_config.h | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index
2015 Mar 31
2
[PATCH] virtio_config: reorder functions
This simply reorders functions in virtio_config
so width access wrapper helpers are all together.
Drops an extra empty line while we are at it.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
include/linux/virtio_config.h | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index
2015 Apr 08
0
[PATCH] virtio_config: reorder functions
On Tue, Mar 31, 2015 at 05:17:25PM +0200, Michael S. Tsirkin wrote:
> This simply reorders functions in virtio_config
> so width access wrapper helpers are all together.
> Drops an extra empty line while we are at it.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
Ping
> ---
> include/linux/virtio_config.h | 15 +++++++--------
> 1 file changed, 7
2020 Aug 04
1
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On Mon, 3 Aug 2020 16:58:46 -0400
"Michael S. Tsirkin" <mst at 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
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,