From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIJq8-0007X1-Mf for qemu-devel@nongnu.org; Tue, 25 Feb 2014 10:22:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIJq2-0005Zr-ON for qemu-devel@nongnu.org; Tue, 25 Feb 2014 10:22:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIJq2-0005YB-Gz for qemu-devel@nongnu.org; Tue, 25 Feb 2014 10:22:30 -0500 Date: Tue, 25 Feb 2014 16:22:10 +0100 From: Stefan Hajnoczi Message-ID: <20140225152210.GB2374@stefanha-thinkpad.redhat.com> References: <20140221112802.15111.10669.stgit@bahia.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140221112802.15111.10669.stgit@bahia.local> Subject: Re: [Qemu-devel] [PATCH v5 0/8] virtio endian-ambivalent target fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz 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, anthony@codemonkey.ws, cornelia.huck@de.ibm.com, pbonzini@redhat.com, afaerber@suse.de On Fri, Feb 21, 2014 at 12:28:03PM +0100, Greg Kurz wrote: > This serie introduces helpers to enable virtio devices in a cross-endian > environment. As of today, we only have legacy virtio but hopefully this > helpers will be reused when we implement virtio 1.0. > > Some assumptions are made for the legacy implementation: > - all guest cpus have the same endianness > - all virtio devices have the same endianness > - endianness does not change while the device is in use > > The decision to byteswap or not is hence controlled by a global variable that > gets initialized on the virtio reset path for each device. This is slightly > suboptimal, but since reset is not a critical path, it is a viable solution. > > Of course, this patchset needs some arch specific enablement to be fully > functionnal (PPC patches have already been posted to support KVM and TCG). > > The changes since the last post are: > - fixed SoB lines and subjects, as suggested by Andreas > - fixed missing virtio_ in patch 2/8, spotted by Cornelia > - relicensed virtio-access.h to GPLv2+ in patch 1/8, as requested by Rusty The device conversions look fine but I think we should avoid using a global bool. I replied in more detail to Patch 1.