From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2MF-0007mo-84 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:06:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC2MC-0004iK-38 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:06:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2MB-0004iE-UD for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:06:32 -0400 Date: Mon, 6 Jul 2015 12:06:28 +0300 From: "Michael S. Tsirkin" Message-ID: <20150706120539-mutt-send-email-mst@redhat.com> References: <1435842022-13980-1-git-send-email-mst@redhat.com> <5595876E.2040803@redhat.com> <20150702205556-mutt-send-email-mst@redhat.com> <55958AE2.1020600@redhat.com> <20150704230256-mutt-send-email-mst@redhat.com> <559A3246.7020103@redhat.com> <20150706105048-mutt-send-email-mst@redhat.com> <559A4067.3060109@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <559A4067.3060109@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] virtio-pci: implement cfg capability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, hpoussin@reactos.org, qemu-devel@nongnu.org On Mon, Jul 06, 2015 at 10:46:31AM +0200, Paolo Bonzini wrote: >=20 >=20 > On 06/07/2015 10:33, Michael S. Tsirkin wrote: > > Also, by luck, some values work the same whatever the endian-ness. > > E.g. dma_memory_set fills the buffer with a given pattern, so > > nothing changes if you byte-swap it. > >=20 > > Here's an example that's wrong: dp8393x. Typically it's accessing > > memory for DMA, so there's no byteswap. Works fine. > >=20 > > But should device attempt to access another device memory, > > it would break because MIPS target is BE. > >=20 > > Cc Herv=E9 for confirmation. > >=20 > > I conclude that virtio is not so special in needing a variant > > of address_space_rw that assumes host endian format for the data. >=20 > Why host endian and not device (in this case little) endian? >=20 > Paolo It's the endian of the originator of the transaction. And emulated device code is all compiled in host endian-ness. --=20 MST