From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTaiy-00056O-Ms for qemu-devel@nongnu.org; Fri, 28 Mar 2014 13:37:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTaiq-0005bn-IE for qemu-devel@nongnu.org; Fri, 28 Mar 2014 13:37:48 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:58311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTaiq-0005Yt-9D for qemu-devel@nongnu.org; Fri, 28 Mar 2014 13:37:40 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Mar 2014 17:37:38 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 8DC7E17D8059 for ; Fri, 28 Mar 2014 17:38:23 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2SHbO2b66912494 for ; Fri, 28 Mar 2014 17:37:24 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2SHbY3l001462 for ; Fri, 28 Mar 2014 11:37:35 -0600 Date: Fri, 28 Mar 2014 18:37:29 +0100 From: Greg Kurz Message-ID: <20140328183729.5aeb724e@bahia.local> In-Reply-To: <5335AFA7.9010306@suse.de> References: <20140328105709.21018.88000.stgit@bahia.local> <20140328105756.21018.57522.stgit@bahia.local> <20140328181326.22c0a6a5@bahia.local> <5335AFA7.9010306@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: kwolf@redhat.com, peter.maydell@linaro.org, thuth@linux.vnet.ibm.com, mst@redhat.com, marc.zyngier@arm.com, rusty@rustcorp.com.au, agraf@suse.de, qemu-devel@nongnu.org, stefanha@redhat.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, anthony@codemonkey.ws On Fri, 28 Mar 2014 18:21:43 +0100 Andreas F=C3=A4rber wrote: > Am 28.03.2014 18:13, schrieb Greg Kurz: > > On Fri, 28 Mar 2014 11:57:56 +0100 > > Greg Kurz wrote: > >> @@ -519,8 +521,8 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, = SCSIDevice *dev, > >> > >> evt =3D req->resp.event; > >> memset(evt, 0, sizeof(VirtIOSCSIEvent)); > >> - evt->event =3D event; > >> - evt->reason =3D reason; > >> + evt->event =3D virtio_tswap32(event); > >> + evt->reason =3D virtio_tswap32(reason); > >=20 > > My bad again, it should be: > >=20 > > + evt->event =3D virtio_tswap32(event, vdev); > > + evt->reason =3D virtio_tswap32(reason, vdev); >=20 > Pure bikeshedding, but wouldn't it make sense to have the vdev as first > argument? >=20 I have thought about it also... it would make sense to do the same with all the other helpers in virtio-access.h then. And while we are at it, since we pass &address_space_memory to all occurenc= es of virtio_*_phys() and I don't see why we would change that, maybe we can also move that into the helpers. Thoughts ? > Regards, > Andreas >=20 Thanks. --=20 Gregory Kurz kurzgreg@fr.ibm.com gkurz@linux.vnet.ibm.com Software Engineer @ IBM/Meiosys http://www.ibm.com Tel +33 (0)562 165 496 "Anarchy is about taking complete responsibility for yourself." Alan Moore.