From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V96E1-00045b-OK for qemu-devel@nongnu.org; Tue, 13 Aug 2013 00:28:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V96E0-0006yB-G5 for qemu-devel@nongnu.org; Tue, 13 Aug 2013 00:28:53 -0400 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:57012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V96Dz-0006v3-RX for qemu-devel@nongnu.org; Tue, 13 Aug 2013 00:28:52 -0400 From: Rusty Russell In-Reply-To: <87txivrrsz.fsf@codemonkey.ws> References: <1376294363-4650-1-git-send-email-rusty@rustcorp.com.au> <1376294363-4650-2-git-send-email-rusty@rustcorp.com.au> <1376299687.32100.159.camel@pasglop> <87txivrrsz.fsf@codemonkey.ws> Date: Tue, 13 Aug 2013 13:50:05 +0930 Message-ID: <87a9kmmdca.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Benjamin Herrenschmidt Cc: qemu-devel@nongnu.org Anthony Liguori writes: > Benjamin Herrenschmidt writes: > >> On Mon, 2013-08-12 at 17:29 +0930, Rusty Russell wrote: >>> virtio data structures are defined as "target endian", which assumes >>> that's a fixed value. In fact, that actually means it's >>> platform-specific. >>> >>> Hopefully the OASIS virtio 1.0 spec will fix this. Meanwhile, create >>> a hook for little endian ppc. >> >> Ok, sorry if I missed a previous debate on that one but why do you do a >> call-out to architecture specific stuff (that is not even inline) on >> every access ? Anthony said he wanted it that way: my initial patch was more optimized. > Let's focus on getting something merged. Then we can muck around with > it down the road. > > Having target-ppc call into virtio is a layering violation. This > approach keeps the dependencies cleaner. We can have it call once (eg. when the first and storing the status word) and store the result. Cheers, Rusty.