From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8WUl-0006T8-Rl for qemu-devel@nongnu.org; Fri, 26 Jun 2015 12:28:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8WUf-0000rU-AL for qemu-devel@nongnu.org; Fri, 26 Jun 2015 12:28:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8WUf-0000rN-5V for qemu-devel@nongnu.org; Fri, 26 Jun 2015 12:28:45 -0400 Date: Fri, 26 Jun 2015 18:28:42 +0200 From: "Michael S. Tsirkin" Message-ID: <20150626182809-mutt-send-email-mst@redhat.com> References: <20150626073212.26832.5649.stgit@bahia.huguette.org> <20150626073221.26832.58745.stgit@bahia.huguette.org> <20150626122845.566e1786.cornelia.huck@de.ibm.com> <20150626141838.612820ac@bahia.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150626141838.612820ac@bahia.local> Subject: Re: [Qemu-devel] [PATCH 1/2] dataplane: drop copy_in_vring_desc() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: Cornelia Huck , qemu-devel@nongnu.org, Stefan Hajnoczi On Fri, Jun 26, 2015 at 02:18:38PM +0200, Greg Kurz wrote: > On Fri, 26 Jun 2015 12:28:45 +0200 > Cornelia Huck wrote: > > > On Fri, 26 Jun 2015 09:32:21 +0200 > > Greg Kurz wrote: > > > > > During early virtio 1.0 devel, there were several proposals about how to > > > deal with the endianness of the vring descriptor fields: > > > - convert the decriptor to host endianness in a single place, and use its > > > fields directly in the code > > > - keep the descriptor untouched and use virtio memory helpers to access its > > > fields with the appropriate endianness > > > > > > It seems like both approaches got merged: commit f5a5628cf0b6 introduces > > > an extra swap that negates the one brought by commit b0e5d90ebc3e. This > > > breaks boot in SLOF (BE client) when host is ppc64le with the following > > > QEMU error: > > > > > > Failed to map descriptor addr 0x18e2517e00000000 len 268435456 > > > > > > A solution could be to revert f5a5628cf0b6, but dropping copy_in_vring_desc() > > > is equivalent and result in a smaller patch. > > > > I'd prefer the revert, as the resulting code is nicer IMHO. > > > > Agreed. It is good to clear the endianness noise out of the real code. :) Can you please send v2 that works the way you want it? > > But your second patch should apply regardless. > > > > Thanks for your feedback. > > > > > > > This patch allows SLOF to boot the OS. > > > > > > Signed-off-by: Greg Kurz > > > --- > > > hw/virtio/dataplane/vring.c | 14 ++------------ > > > 1 file changed, 2 insertions(+), 12 deletions(-)