From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC22x-0005b0-IO for qemu-devel@nongnu.org; Mon, 06 Jul 2015 04:46:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC22s-0002w4-GY for qemu-devel@nongnu.org; Mon, 06 Jul 2015 04:46:39 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:37176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC22s-0002vo-8Z for qemu-devel@nongnu.org; Mon, 06 Jul 2015 04:46:34 -0400 Received: by wiclp1 with SMTP id lp1so13995339wic.0 for ; Mon, 06 Jul 2015 01:46:33 -0700 (PDT) Sender: Paolo Bonzini 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> From: Paolo Bonzini Message-ID: <559A4067.3060109@redhat.com> Date: Mon, 6 Jul 2015 10:46:31 +0200 MIME-Version: 1.0 In-Reply-To: <20150706105048-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] virtio-pci: implement cfg capability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: peter.maydell@linaro.org, hpoussin@reactos.org, qemu-devel@nongnu.org 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. > > Here's an example that's wrong: dp8393x. Typically it's accessing > memory for DMA, so there's no byteswap. Works fine. > > But should device attempt to access another device memory, > it would break because MIPS target is BE. > > Cc Hervé for confirmation. > > I conclude that virtio is not so special in needing a variant > of address_space_rw that assumes host endian format for the data. Why host endian and not device (in this case little) endian? Paolo