Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-06 Thread Paolo Bonzini
On 03/06/2016 03:16, David Gibson wrote: > On Thu, Jun 02, 2016 at 06:04:37PM +0200, Greg Kurz wrote: >> On Wed, 1 Jun 2016 12:33:28 +1000 >> David Gibson wrote: >> >>> On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: On 31/05/2016 15:10, Greg Kurz wrote: >

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-02 Thread Greg Kurz
On Fri, 3 Jun 2016 11:16:04 +1000 David Gibson wrote: > On Thu, Jun 02, 2016 at 06:04:37PM +0200, Greg Kurz wrote: > > On Wed, 1 Jun 2016 12:33:28 +1000 > > David Gibson wrote: > > > > > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > > > > > > > > > > > > On 31/05/2016 1

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-02 Thread David Gibson
On Thu, Jun 02, 2016 at 06:04:37PM +0200, Greg Kurz wrote: > On Wed, 1 Jun 2016 12:33:28 +1000 > David Gibson wrote: > > > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > > > > > > > > > On 31/05/2016 15:10, Greg Kurz wrote: > > > >>> > > +#if defined(TARGET_PPC64) || defined

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-02 Thread Greg Kurz
On Wed, 1 Jun 2016 12:33:28 +1000 David Gibson wrote: > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > > > > > > On 31/05/2016 15:10, Greg Kurz wrote: > > >>> > > +#if defined(TARGET_PPC64) || defined(TARGET_ARM) > > >>> > > +#define LEGACY_VIRTIO_IS_BIENDIAN 1 > > >>> > > +

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-01 Thread Paolo Bonzini
On 01/06/2016 04:33, David Gibson wrote: > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: >> >> >> On 31/05/2016 15:10, Greg Kurz wrote: >>> +#if defined(TARGET_PPC64) || defined(TARGET_ARM) >>> +#define LEGACY_VIRTIO_IS_BIENDIAN 1 >>> +#endif > > These will

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread David Gibson
On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > > > On 31/05/2016 15:10, Greg Kurz wrote: > >>> > > +#if defined(TARGET_PPC64) || defined(TARGET_ARM) > >>> > > +#define LEGACY_VIRTIO_IS_BIENDIAN 1 > >>> > > +#endif > >> > > >> > These will only be correct if something else inc

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
On Tue, 31 May 2016 15:15:21 +0200 Paolo Bonzini wrote: > On 31/05/2016 15:10, Greg Kurz wrote: > >>> > > +#if defined(TARGET_PPC64) || defined(TARGET_ARM) > >>> > > +#define LEGACY_VIRTIO_IS_BIENDIAN 1 > >>> > > +#endif > >> > > >> > These will only be correct if something else includes cpu

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
On Tue, 31 May 2016 14:14:15 +0100 Peter Maydell wrote: > On 31 May 2016 at 14:10, Greg Kurz wrote: > > Hence my tentative to put all the details in one place... would it > > be ok if I include "config-target.h" to ensure we have the TARGET macros ? > > No, config-target.h is one of the heade

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Paolo Bonzini
On 31/05/2016 15:10, Greg Kurz wrote: >>> > > +#if defined(TARGET_PPC64) || defined(TARGET_ARM) >>> > > +#define LEGACY_VIRTIO_IS_BIENDIAN 1 >>> > > +#endif >> > >> > These will only be correct if something else includes cpu.h. Instead of > Unless I missed something, the TARGET_* macros come

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Peter Maydell
On 31 May 2016 at 14:10, Greg Kurz wrote: > Hence my tentative to put all the details in one place... would it > be ok if I include "config-target.h" to ensure we have the TARGET macros ? No, config-target.h is one of the headers that should never be included by any file except osdep.h (and scrip

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
On Tue, 31 May 2016 13:54:11 +0200 Paolo Bonzini wrote: > On 31/05/2016 10:09, Greg Kurz wrote: > > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > > index 440071815408..81cc5b0ae35c 100644 > > --- a/hw/virtio/vhost.c > > +++ b/hw/virtio/vhost.c > > @@ -767,15 +767,11 @@ static inline bool

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Paolo Bonzini
On 31/05/2016 10:09, Greg Kurz wrote: > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > index 440071815408..81cc5b0ae35c 100644 > --- a/hw/virtio/vhost.c > +++ b/hw/virtio/vhost.c > @@ -767,15 +767,11 @@ static inline bool > vhost_needs_vring_endian(VirtIODevice *vdev) > if (virtio_vde

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Cédric Le Goater
On 05/31/2016 10:09 AM, Greg Kurz wrote: > Paolo's recent cpu.h cleanups broke legacy virtio for ppc64 LE guests (and > arm BE guests as well, even if I have not verified that). Especially, commit > "33c11879fd42 qemu-common: push cpu.h inclusion out of qemu-common.h" has > the side-effect of silen

[Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
Paolo's recent cpu.h cleanups broke legacy virtio for ppc64 LE guests (and arm BE guests as well, even if I have not verified that). Especially, commit "33c11879fd42 qemu-common: push cpu.h inclusion out of qemu-common.h" has the side-effect of silently hiding the TARGET_IS_BIENDIAN macro from the