From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFkSi-0001m8-81 for qemu-devel@nongnu.org; Tue, 18 Feb 2014 08:11:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFkSX-0005xw-2G for qemu-devel@nongnu.org; Tue, 18 Feb 2014 08:11:47 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:50832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFkSW-0005xs-QD for qemu-devel@nongnu.org; Tue, 18 Feb 2014 08:11:36 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Feb 2014 13:11:36 -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 6FC841B08061 for ; Tue, 18 Feb 2014 13:11:10 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1IDBKOx35520572 for ; Tue, 18 Feb 2014 13:11:21 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1IDBVI2004824 for ; Tue, 18 Feb 2014 06:11:32 -0700 Date: Tue, 18 Feb 2014 14:11:30 +0100 From: Greg Kurz Message-ID: <20140218141130.27f0b2c5@bahia.local> In-Reply-To: <20140218140835.1d2d3dce.cornelia.huck@de.ibm.com> References: <20140218123844.9849.58557.stgit@bahia.lab.toulouse-stg.fr.ibm.com> <20140218123854.9849.25094.stgit@bahia.lab.toulouse-stg.fr.ibm.com> <20140218140835.1d2d3dce.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/8] virtio: allow byte swapping for vring and config access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck 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, anthony@codemonkey.ws, pbonzini@redhat.com, afaerber@suse.de On Tue, 18 Feb 2014 14:08:35 +0100 Cornelia Huck wrote: > On Tue, 18 Feb 2014 13:38:54 +0100 > Greg Kurz wrote: > > > From: Rusty Russell > > > > This is based on a simpler patch by Anthony Liguouri, which only handled > > the vring accesses. We also need some drivers to access these helpers, > > eg. for data which contains headers. > > > > [ ldq_phys() API change, Greg Kurz ] > > Signed-off-by: Rusty Russell > > Signed-off-by: Greg Kurz > > --- > > hw/virtio/virtio.c | 32 ++++++++++++++++---------------- > > 1 file changed, 16 insertions(+), 16 deletions(-) > > > > > static inline void vring_used_flags_unset_bit(VirtQueue *vq, int mask) > > { > > hwaddr pa; > > pa = vq->vring.used + offsetof(VRingUsed, flags); > > - stw_phys(&address_space_memory, > > - pa, lduw_phys(&address_space_memory, pa) & ~mask); > > + virtio_stw_phys(&address_space_memory, > > + pa, lduw_phys(&address_space_memory, pa) & ~mask); > > } > > This needs to be virtio_lduw_phys(), no? Oops yes it should be... my mistake. :) -- 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.