qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-am


From: Rusty Russell
Subject: Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio.
Date: Fri, 06 Sep 2013 11:57:55 +0930
User-agent: Notmuch/0.15.2+81~gd2c8818 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu)

Benjamin Herrenschmidt <address@hidden> 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 ?
>
> If we consider that virtio byte order is global, can't you make it a
> global that is *set* by the architecture rather than *polled* by
> virtio ?

OK, so after some more offline discussion it turns out these patches
won't really work reliably, since powerpc kvm doesn't reflect the
register into qemu.

Mikey N has promised me a KVM_GET_ONE_REG to get the register, and I'll
rework on top of that: we will query that whenever a device is reset
(which Linux does on every device init, so it captures the kexec case
too).

Cheers,
Rusty.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]