All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
@ 2017-08-30 13:39 Thomas Huth
  2017-08-30 14:13 ` Cornelia Huck
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Thomas Huth @ 2017-08-30 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, David Gibson, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Marc-André Lureau

The "slow" ivshmem-tests currently fail when they are running on a
big endian host:

$ uname -m
ppc64
$ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/ivshmem-test -m slow
/x86_64/ivshmem/single: OK
/x86_64/ivshmem/hotplug: OK
/x86_64/ivshmem/memdev: OK
/x86_64/ivshmem/pair: OK
/x86_64/ivshmem/server-msi: qemu-system-x86_64:
 -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid ID message
Broken pipe

The problem is that the server side code in ivshmem_server_send_one_msg()
correctly translates all messages IDs into little endian 64-bit values,
but the client side code in the ivshmem_recv_msg() function does not swap
the byte order back. Fix it by passing the value through le64_to_cpu().

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/misc/ivshmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 47a015f..b3ef3ec 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -653,7 +653,7 @@ static int64_t ivshmem_recv_msg(IVShmemState *s, int *pfd, Error **errp)
     } while (n < sizeof(msg));
 
     *pfd = qemu_chr_fe_get_msgfd(&s->server_chr);
-    return msg;
+    return le64_to_cpu(msg);
 }
 
 static void ivshmem_recv_setup(IVShmemState *s, Error **errp)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 13:39 [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems Thomas Huth
@ 2017-08-30 14:13 ` Cornelia Huck
  2017-08-30 14:48   ` Thomas Huth
  2017-08-30 14:39 ` Marc-André Lureau
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Cornelia Huck @ 2017-08-30 14:13 UTC (permalink / raw)
  To: Thomas Huth
  Cc: qemu-devel, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Marc-André Lureau, David Gibson

On Wed, 30 Aug 2017 15:39:03 +0200
Thomas Huth <thuth@redhat.com> wrote:

> The "slow" ivshmem-tests currently fail when they are running on a
> big endian host:
> 
> $ uname -m
> ppc64
> $ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/ivshmem-test -m slow
> /x86_64/ivshmem/single: OK
> /x86_64/ivshmem/hotplug: OK
> /x86_64/ivshmem/memdev: OK
> /x86_64/ivshmem/pair: OK
> /x86_64/ivshmem/server-msi: qemu-system-x86_64:
>  -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid ID message
> Broken pipe
> 
> The problem is that the server side code in ivshmem_server_send_one_msg()
> correctly translates all messages IDs into little endian 64-bit values,
> but the client side code in the ivshmem_recv_msg() function does not swap
> the byte order back. Fix it by passing the value through le64_to_cpu().
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/misc/ivshmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index 47a015f..b3ef3ec 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -653,7 +653,7 @@ static int64_t ivshmem_recv_msg(IVShmemState *s, int *pfd, Error **errp)
>      } while (n < sizeof(msg));
>  
>      *pfd = qemu_chr_fe_get_msgfd(&s->server_chr);
> -    return msg;
> +    return le64_to_cpu(msg);
>  }
>  
>  static void ivshmem_recv_setup(IVShmemState *s, Error **errp)

This fixes the "invalid ID message" problem on s390x for me as well,
and I run now into the same error as on x86 (which you also have a fix
for IIRC), so I guess this is

Tested-by: Cornelia Huck <cohuck@redhat.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 13:39 [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems Thomas Huth
  2017-08-30 14:13 ` Cornelia Huck
@ 2017-08-30 14:39 ` Marc-André Lureau
  2017-08-30 14:53 ` Philippe Mathieu-Daudé
  2017-09-14  7:44 ` Michael Tokarev
  3 siblings, 0 replies; 13+ messages in thread
From: Marc-André Lureau @ 2017-08-30 14:39 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: qemu-trivial, Laurent Vivier, Philippe Mathieu-Daudé, David Gibson

Hi

On Wed, Aug 30, 2017 at 3:43 PM Thomas Huth <thuth@redhat.com> wrote:

> The "slow" ivshmem-tests currently fail when they are running on a
> big endian host:
>
> $ uname -m
> ppc64
> $ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
> tests/ivshmem-test -m slow
> /x86_64/ivshmem/single: OK
> /x86_64/ivshmem/hotplug: OK
> /x86_64/ivshmem/memdev: OK
> /x86_64/ivshmem/pair: OK
> /x86_64/ivshmem/server-msi: qemu-system-x86_64:
>  -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid ID
> message
> Broken pipe
>
> The problem is that the server side code in ivshmem_server_send_one_msg()
> correctly translates all messages IDs into little endian 64-bit values,
> but the client side code in the ivshmem_recv_msg() function does not swap
> the byte order back. Fix it by passing the value through le64_to_cpu().
>
>
ivshmem_read() is correct though

Signed-off-by: Thomas Huth <thuth@redhat.com>
>

 Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  hw/misc/ivshmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index 47a015f..b3ef3ec 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -653,7 +653,7 @@ static int64_t ivshmem_recv_msg(IVShmemState *s, int
> *pfd, Error **errp)
>      } while (n < sizeof(msg));
>
>      *pfd = qemu_chr_fe_get_msgfd(&s->server_chr);
> -    return msg;
> +    return le64_to_cpu(msg);
>  }
>
>  static void ivshmem_recv_setup(IVShmemState *s, Error **errp)
> --
> 1.8.3.1
>
>
> --
Marc-André Lureau

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 14:13 ` Cornelia Huck
@ 2017-08-30 14:48   ` Thomas Huth
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2017-08-30 14:48 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Laurent Vivier, qemu-trivial, qemu-devel,
	Philippe Mathieu-Daudé,
	Marc-André Lureau, David Gibson

On 30.08.2017 16:13, Cornelia Huck wrote:
> On Wed, 30 Aug 2017 15:39:03 +0200
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> The "slow" ivshmem-tests currently fail when they are running on a
>> big endian host:
>>
>> $ uname -m
>> ppc64
>> $ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/ivshmem-test -m slow
>> /x86_64/ivshmem/single: OK
>> /x86_64/ivshmem/hotplug: OK
>> /x86_64/ivshmem/memdev: OK
>> /x86_64/ivshmem/pair: OK
>> /x86_64/ivshmem/server-msi: qemu-system-x86_64:
>>  -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid ID message
>> Broken pipe
>>
>> The problem is that the server side code in ivshmem_server_send_one_msg()
>> correctly translates all messages IDs into little endian 64-bit values,
>> but the client side code in the ivshmem_recv_msg() function does not swap
>> the byte order back. Fix it by passing the value through le64_to_cpu().
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
[...]
> This fixes the "invalid ID message" problem on s390x for me as well,
> and I run now into the same error as on x86 (which you also have a fix
> for IIRC)
Yes, you also need my other patch, look for "tests: Fix broken
ivshmem-server-msi/-irq tests" on the list.

 Thomas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 13:39 [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems Thomas Huth
  2017-08-30 14:13 ` Cornelia Huck
  2017-08-30 14:39 ` Marc-André Lureau
@ 2017-08-30 14:53 ` Philippe Mathieu-Daudé
  2017-08-30 14:59   ` Thomas Huth
  2017-08-30 14:59   ` Peter Maydell
  2017-09-14  7:44 ` Michael Tokarev
  3 siblings, 2 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-08-30 14:53 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: qemu-trivial, David Gibson, Laurent Vivier, Marc-André Lureau

On 08/30/2017 10:39 AM, Thomas Huth wrote:
> The "slow" ivshmem-tests currently fail when they are running on a
> big endian host:
> 
> $ uname -m
> ppc64
> $ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/ivshmem-test -m slow
> /x86_64/ivshmem/single: OK
> /x86_64/ivshmem/hotplug: OK
> /x86_64/ivshmem/memdev: OK
> /x86_64/ivshmem/pair: OK
> /x86_64/ivshmem/server-msi: qemu-system-x86_64:
>   -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid ID message
> Broken pipe
> 
> The problem is that the server side code in ivshmem_server_send_one_msg()
> correctly translates all messages IDs into little endian 64-bit values,
> but the client side code in the ivshmem_recv_msg() function does not swap
> the byte order back. Fix it by passing the value through le64_to_cpu().

Yes, we lack BE testing :(

I read we can run docker on s390x, I wonder if we can ask for a FOSS 
account on some to run the test suite.

> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>   hw/misc/ivshmem.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index 47a015f..b3ef3ec 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -653,7 +653,7 @@ static int64_t ivshmem_recv_msg(IVShmemState *s, int *pfd, Error **errp)
>       } while (n < sizeof(msg));
>   
>       *pfd = qemu_chr_fe_get_msgfd(&s->server_chr);
> -    return msg;
> +    return le64_to_cpu(msg);
>   }
>   
>   static void ivshmem_recv_setup(IVShmemState *s, Error **errp)
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 14:53 ` Philippe Mathieu-Daudé
@ 2017-08-30 14:59   ` Thomas Huth
  2017-08-30 15:11     ` Cornelia Huck
  2017-08-30 14:59   ` Peter Maydell
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Huth @ 2017-08-30 14:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-trivial, David Gibson, Laurent Vivier, Marc-André Lureau

On 30.08.2017 16:53, Philippe Mathieu-Daudé wrote:
> On 08/30/2017 10:39 AM, Thomas Huth wrote:
>> The "slow" ivshmem-tests currently fail when they are running on a
>> big endian host:
>>
>> $ uname -m
>> ppc64
>> $ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
>> tests/ivshmem-test -m slow
>> /x86_64/ivshmem/single: OK
>> /x86_64/ivshmem/hotplug: OK
>> /x86_64/ivshmem/memdev: OK
>> /x86_64/ivshmem/pair: OK
>> /x86_64/ivshmem/server-msi: qemu-system-x86_64:
>>   -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid
>> ID message
>> Broken pipe
>>
>> The problem is that the server side code in ivshmem_server_send_one_msg()
>> correctly translates all messages IDs into little endian 64-bit values,
>> but the client side code in the ivshmem_recv_msg() function does not swap
>> the byte order back. Fix it by passing the value through le64_to_cpu().
> 
> Yes, we lack BE testing :(

As far as I know, some people are already running the tests on s390x and
ppc64 ... the problem is that apparently nobody is running with
SPEED=slow there - that's why this problem slipped through so far.
Maybe we should switch to the SPEED=slow by default in the Makefile?

 Thomas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 14:53 ` Philippe Mathieu-Daudé
  2017-08-30 14:59   ` Thomas Huth
@ 2017-08-30 14:59   ` Peter Maydell
  2017-09-10  3:24     ` David Gibson
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2017-08-30 14:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, QEMU Developers, QEMU Trivial, Laurent Vivier,
	Marc-André Lureau, David Gibson

On 30 August 2017 at 15:53, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 08/30/2017 10:39 AM, Thomas Huth wrote:
>> The problem is that the server side code in ivshmem_server_send_one_msg()
>> correctly translates all messages IDs into little endian 64-bit values,
>> but the client side code in the ivshmem_recv_msg() function does not swap
>> the byte order back. Fix it by passing the value through le64_to_cpu().
>
>
> Yes, we lack BE testing :(

My pre-pull-request test set includes s390 and ppc64 bigendian.
This one was just missed because the 'slow' tests aren't in
'make check'.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 14:59   ` Thomas Huth
@ 2017-08-30 15:11     ` Cornelia Huck
  0 siblings, 0 replies; 13+ messages in thread
From: Cornelia Huck @ 2017-08-30 15:11 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Laurent Vivier, Marc-André Lureau,
	David Gibson

On Wed, 30 Aug 2017 16:59:03 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 30.08.2017 16:53, Philippe Mathieu-Daudé wrote:
> > On 08/30/2017 10:39 AM, Thomas Huth wrote:  
> >> The "slow" ivshmem-tests currently fail when they are running on a
> >> big endian host:
> >>
> >> $ uname -m
> >> ppc64
> >> $ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
> >> tests/ivshmem-test -m slow
> >> /x86_64/ivshmem/single: OK
> >> /x86_64/ivshmem/hotplug: OK
> >> /x86_64/ivshmem/memdev: OK
> >> /x86_64/ivshmem/pair: OK
> >> /x86_64/ivshmem/server-msi: qemu-system-x86_64:
> >>   -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid
> >> ID message
> >> Broken pipe
> >>
> >> The problem is that the server side code in ivshmem_server_send_one_msg()
> >> correctly translates all messages IDs into little endian 64-bit values,
> >> but the client side code in the ivshmem_recv_msg() function does not swap
> >> the byte order back. Fix it by passing the value through le64_to_cpu().  
> > 
> > Yes, we lack BE testing :(  
> 
> As far as I know, some people are already running the tests on s390x and
> ppc64 ... the problem is that apparently nobody is running with
> SPEED=slow there - that's why this problem slipped through so far.
> Maybe we should switch to the SPEED=slow by default in the Makefile?

Not sure whether that is a good idea. /me adding this to my s390x tests
should help, though.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 14:59   ` Peter Maydell
@ 2017-09-10  3:24     ` David Gibson
  2017-09-10 17:01       ` Philippe Mathieu-Daudé
  2017-09-11  2:35       ` Thomas Huth
  0 siblings, 2 replies; 13+ messages in thread
From: David Gibson @ 2017-09-10  3:24 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Philippe Mathieu-Daudé,
	Thomas Huth, QEMU Developers, QEMU Trivial, Laurent Vivier,
	Marc-André Lureau

[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]

On Wed, Aug 30, 2017 at 03:59:07PM +0100, Peter Maydell wrote:
> On 30 August 2017 at 15:53, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> > On 08/30/2017 10:39 AM, Thomas Huth wrote:
> >> The problem is that the server side code in ivshmem_server_send_one_msg()
> >> correctly translates all messages IDs into little endian 64-bit values,
> >> but the client side code in the ivshmem_recv_msg() function does not swap
> >> the byte order back. Fix it by passing the value through le64_to_cpu().
> >
> >
> > Yes, we lack BE testing :(
> 
> My pre-pull-request test set includes s390 and ppc64 bigendian.
> This one was just missed because the 'slow' tests aren't in
> 'make check'.

I'm not what makes sense for staging this fix.  I could take it
through my tree, but it's not an obvious match, since this isn't
really related to ppc at all.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-09-10  3:24     ` David Gibson
@ 2017-09-10 17:01       ` Philippe Mathieu-Daudé
  2017-09-11  2:35       ` Thomas Huth
  1 sibling, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-10 17:01 UTC (permalink / raw)
  To: David Gibson
  Cc: Peter Maydell, Thomas Huth, QEMU Developers, QEMU Trivial,
	Laurent Vivier, Marc-André Lureau, Paolo Bonzini

On 09/10/2017 12:24 AM, David Gibson wrote:
> I'm not what makes sense for staging this fix.  I could take it
> through my tree, but it's not an obvious match, since this isn't
> really related to ppc at all.

Paolo's misc? :D

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-09-10  3:24     ` David Gibson
  2017-09-10 17:01       ` Philippe Mathieu-Daudé
@ 2017-09-11  2:35       ` Thomas Huth
  2017-09-11  7:29         ` Cornelia Huck
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Huth @ 2017-09-11  2:35 UTC (permalink / raw)
  To: David Gibson, Peter Maydell
  Cc: Philippe Mathieu-Daudé,
	QEMU Developers, QEMU Trivial, Laurent Vivier,
	Marc-André Lureau, Cornelia Huck

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

On 10.09.2017 05:24, David Gibson wrote:
> On Wed, Aug 30, 2017 at 03:59:07PM +0100, Peter Maydell wrote:
>> On 30 August 2017 at 15:53, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>> On 08/30/2017 10:39 AM, Thomas Huth wrote:
>>>> The problem is that the server side code in ivshmem_server_send_one_msg()
>>>> correctly translates all messages IDs into little endian 64-bit values,
>>>> but the client side code in the ivshmem_recv_msg() function does not swap
>>>> the byte order back. Fix it by passing the value through le64_to_cpu().
>>>
>>>
>>> Yes, we lack BE testing :(
>>
>> My pre-pull-request test set includes s390 and ppc64 bigendian.
>> This one was just missed because the 'slow' tests aren't in
>> 'make check'.
> 
> I'm not what makes sense for staging this fix.  I could take it
> through my tree, but it's not an obvious match, since this isn't
> really related to ppc at all.

There does not seem to be maintainer for ivshmem, as far as I can see,
so I'd say any tree that is distantly related is fine. So I think you
could either take it through your ppc tree (since the bug affects big
endian ppc machines), or maybe Cornelia could take it through the s390x
tree (since we've seen the problem on the big endian s390x machines,
too). Otherwise I have to wait and see whether it goes through misc or
trivial, I guess...

 Thomas


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-09-11  2:35       ` Thomas Huth
@ 2017-09-11  7:29         ` Cornelia Huck
  0 siblings, 0 replies; 13+ messages in thread
From: Cornelia Huck @ 2017-09-11  7:29 UTC (permalink / raw)
  To: Thomas Huth
  Cc: David Gibson, Peter Maydell, Philippe Mathieu-Daudé,
	QEMU Developers, QEMU Trivial, Laurent Vivier,
	Marc-André Lureau

On Mon, 11 Sep 2017 04:35:08 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 10.09.2017 05:24, David Gibson wrote:
> > On Wed, Aug 30, 2017 at 03:59:07PM +0100, Peter Maydell wrote:  
> >> On 30 August 2017 at 15:53, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:  
> >>> On 08/30/2017 10:39 AM, Thomas Huth wrote:  
> >>>> The problem is that the server side code in ivshmem_server_send_one_msg()
> >>>> correctly translates all messages IDs into little endian 64-bit values,
> >>>> but the client side code in the ivshmem_recv_msg() function does not swap
> >>>> the byte order back. Fix it by passing the value through le64_to_cpu().  
> >>>
> >>>
> >>> Yes, we lack BE testing :(  
> >>
> >> My pre-pull-request test set includes s390 and ppc64 bigendian.
> >> This one was just missed because the 'slow' tests aren't in
> >> 'make check'.  
> > 
> > I'm not what makes sense for staging this fix.  I could take it
> > through my tree, but it's not an obvious match, since this isn't
> > really related to ppc at all.  
> 
> There does not seem to be maintainer for ivshmem, as far as I can see,
> so I'd say any tree that is distantly related is fine. So I think you
> could either take it through your ppc tree (since the bug affects big
> endian ppc machines), or maybe Cornelia could take it through the s390x
> tree (since we've seen the problem on the big endian s390x machines,
> too). Otherwise I have to wait and see whether it goes through misc or
> trivial, I guess...

I'll queue it; and whoever sends the first pull request, 'wins' :)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
  2017-08-30 13:39 [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems Thomas Huth
                   ` (2 preceding siblings ...)
  2017-08-30 14:53 ` Philippe Mathieu-Daudé
@ 2017-09-14  7:44 ` Michael Tokarev
  3 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2017-09-14  7:44 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: qemu-trivial, Laurent Vivier, Philippe Mathieu-Daudé,
	Marc-André Lureau, David Gibson

30.08.2017 16:39, Thomas Huth пишет:
> The "slow" ivshmem-tests currently fail when they are running on a
> big endian host:

Applied to -trivial, thanks!

/mjt

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-09-14  7:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 13:39 [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems Thomas Huth
2017-08-30 14:13 ` Cornelia Huck
2017-08-30 14:48   ` Thomas Huth
2017-08-30 14:39 ` Marc-André Lureau
2017-08-30 14:53 ` Philippe Mathieu-Daudé
2017-08-30 14:59   ` Thomas Huth
2017-08-30 15:11     ` Cornelia Huck
2017-08-30 14:59   ` Peter Maydell
2017-09-10  3:24     ` David Gibson
2017-09-10 17:01       ` Philippe Mathieu-Daudé
2017-09-11  2:35       ` Thomas Huth
2017-09-11  7:29         ` Cornelia Huck
2017-09-14  7:44 ` Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.