From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-pci: implement cfg capability
Date: Mon, 6 Jul 2015 09:46:14 +0200 [thread overview]
Message-ID: <559A3246.7020103@redhat.com> (raw)
In-Reply-To: <20150704230256-mutt-send-email-mst@redhat.com>
On 04/07/2015 23:19, Michael S. Tsirkin wrote:
> The fact that address_space_write/_read actually does a byteswap if
> host!=target endian should probably be documented.
FWIW, it's not if host != target endian. It's if memory region
endianness != target endianness. See memory_region_wrong_endianness.
> Or maybe it should be changed: it seems likely that non-target-specific devices
> that use it do this incorrectly ATM. In particular, dma_memory_rw_relaxed calls
> address_space_rw and since DMA originates with devices I think there's very
> little chance that these actually want a different behaviour depending on the
> target endian-ness.
>
> Most likely, these only work correctly because DMA outside RAM
> is highly unusual.
They work correctly because of that, and because most devices *and*
targets are little endian so you have no swap. On ppc64, which has
TARGET_WORDS_BIGENDIAN, it probably wouldn't work correctly.
Paolo
next prev parent reply other threads:[~2015-07-06 7:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 13:00 [Qemu-devel] [PATCH] virtio-pci: implement cfg capability Michael S. Tsirkin
2015-07-02 18:48 ` Paolo Bonzini
2015-07-02 19:00 ` Michael S. Tsirkin
2015-07-02 19:02 ` Paolo Bonzini
2015-07-04 21:19 ` Michael S. Tsirkin
2015-07-06 7:46 ` Paolo Bonzini [this message]
2015-07-06 8:33 ` Michael S. Tsirkin
2015-07-06 8:46 ` Paolo Bonzini
2015-07-06 9:06 ` Michael S. Tsirkin
2015-07-06 9:11 ` Peter Maydell
2015-07-06 10:03 ` Michael S. Tsirkin
2015-07-06 10:04 ` Peter Maydell
2015-07-06 10:31 ` Michael S. Tsirkin
2015-07-06 11:50 ` Peter Maydell
2015-07-06 12:04 ` Paolo Bonzini
2015-07-06 12:15 ` Michael S. Tsirkin
2015-07-06 12:12 ` Michael S. Tsirkin
2015-07-06 12:23 ` Paolo Bonzini
2015-07-03 9:34 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559A3246.7020103@redhat.com \
--to=pbonzini@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).