On 18 June 2014 15:28, Greg Kurz <gk...@linux.vnet.ibm.com> wrote:
> On Wed, 18 Jun 2014 16:42:04 +0300
> "Michael S. Tsirkin" <m...@redhat.com> wrote:
>> On Wed, Jun 18, 2014 at 01:53:15PM +0100, Peter Maydell wrote:
>> > On 18 June 2014 11:38, Stefan Hajnoczi <stefa...@gmail.com> wrote:
>> > > What bothers me is that real hardware can't do this.
>> >
>> > Real hardware doesn't have "endianness matches guest CPU endianness"
>> > semantics, which is what the virtio spec mandates...
>>
>> So it was buggy. We never thought anyone would do a cross endian CPU :(.
>> We are fixing it in 1.0.
>>
>
> virtio isn't the only victim... we also have vga. The problem can pop up
> anywhere you rely on TARGET_WORDS_BIGENDIAN.

No, relying on TARGET_WORDS_BIGENDIAN is fine. It's only
a problem if your guest somehow assumes that messing with
the CPU state changes the behaviour of devices as a random
side effect. That's true for virtio. I'm pushing that it should not
be true for VGA (ie that the guest should have to explicitly tell
the VGA device "be the other endian now"). It's also not true for
most average devices whose endianness is
TARGET_WORDS_BIGENDIAN -- it just means they don't
change behaviour, and if the guest wants to be BE on a
fundamentally LE hardware device it gets to do the byte
swapping...

thanks
-- PMM

Reply via email to