From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjlse-0003nx-Jg for qemu-devel@nongnu.org; Thu, 30 Oct 2014 05:19:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjlsU-0001ca-NS for qemu-devel@nongnu.org; Thu, 30 Oct 2014 05:18:56 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:47586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjlsU-0001cE-F0 for qemu-devel@nongnu.org; Thu, 30 Oct 2014 05:18:46 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Oct 2014 09:18:43 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1D80E1B08051 for ; Thu, 30 Oct 2014 09:18:45 +0000 (GMT) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s9U9IfKB47972448 for ; Thu, 30 Oct 2014 09:18:41 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s9U9IevK001537 for ; Thu, 30 Oct 2014 03:18:40 -0600 Date: Thu, 30 Oct 2014 10:18:38 +0100 From: Cornelia Huck Message-ID: <20141030101838.2ddee2dc.cornelia.huck@de.ibm.com> In-Reply-To: <20141028162254.2a4f2cf4@bahia.local> References: <1412692807-12398-1-git-send-email-cornelia.huck@de.ibm.com> <1412692807-12398-8-git-send-email-cornelia.huck@de.ibm.com> <20141028162254.2a4f2cf4@bahia.local> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFC 07/11] dataplane: allow virtio-1 devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: thuth@linux.vnet.ibm.com, rusty@rustcorp.com.au, qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org On Tue, 28 Oct 2014 16:22:54 +0100 Greg Kurz wrote: > On Tue, 7 Oct 2014 16:40:03 +0200 > Cornelia Huck wrote: >=20 > > Handle endianness conversion for virtio-1 virtqueues correctly. > >=20 > > Note that dataplane now needs to be built per-target. > >=20 >=20 > It also affects hw/virtio/virtio-pci.c: >=20 > In file included from include/hw/virtio/dataplane/vring.h:23:0, > from include/hw/virtio/virtio-scsi.h:21, > from hw/virtio/virtio-pci.c:24: > include/hw/virtio/virtio-access.h: In function =E2=80=98virtio_access_is_= big_endian=E2=80=99: > include/hw/virtio/virtio-access.h:28:15: error: attempt to use poisoned "= TARGET_WORDS_BIGENDIAN" > #elif defined(TARGET_WORDS_BIGENDIAN) > ^ >=20 > FWIW when I added endian ambivalent support to virtio, I remember *some p= eople* > getting angry at the idea of turning common code into per-target... :) Well, it probably can't be helped for something that is endian-sensitive like virtio :( (Although we should try to keep it as local as possible.) >=20 > See comment below. >=20 > > Signed-off-by: Cornelia Huck > > --- > > hw/block/dataplane/virtio-blk.c | 3 +- > > hw/scsi/virtio-scsi-dataplane.c | 2 +- > > hw/virtio/Makefile.objs | 2 +- > > hw/virtio/dataplane/Makefile.objs | 2 +- > > hw/virtio/dataplane/vring.c | 85 +++++++++++++++++++--------= -------- > > include/hw/virtio/dataplane/vring.h | 64 ++++++++++++++++++++++++-- > > 6 files changed, 113 insertions(+), 45 deletions(-) > >=20 > > diff --git a/include/hw/virtio/dataplane/vring.h b/include/hw/virtio/da= taplane/vring.h > > index d3e086a..fde15f3 100644 > > --- a/=20 > > +++ b/include/hw/virtio/dataplane/vring.h > > @@ -20,6 +20,7 @@ > > #include "qemu-common.h" > > #include "hw/virtio/virtio_ring.h" > > #include "hw/virtio/virtio.h" > > +#include "hw/virtio/virtio-access.h" > >=20 >=20 > Since the following commit: >=20 > commit 244e2898b7a7735b3da114c120abe206af56a167 > Author: Fam Zheng > Date: Wed Sep 24 15:21:41 2014 +0800 >=20 > virtio-scsi: Add VirtIOSCSIVring in VirtIOSCSIReq >=20 > The include/hw/virtio/dataplane/vring.h header is indirectly included > by hw/virtio/virtio-pci.c. Why don't you move all this target dependent > helpers to another header ? Ah, this seems to have come in after I hacked on that code - I'll take a look at splitting off the accessors.