[kvm-devel] [RFC PATCH] virtio: change config to guest endian.
Hollis Blanchard
hollisb at us.ibm.com
Tue Apr 22 16:53:09 PDT 2008
On Tuesday 22 April 2008 17:13:01 Anthony Liguori wrote:
> Hollis Blanchard wrote:
> > On Tuesday 22 April 2008 16:05:38 Rusty Russell wrote:
> >
> >> On Wednesday 23 April 2008 06:29:14 Hollis Blanchard wrote:
> >>
> >>> On Tuesday 22 April 2008 09:31:35 Rusty Russell wrote:
> >>>
> >>>> We may still regret not doing *everything* little-endian, but this
> >>>> doesn't make it worse.
> >>>>
> >>> Hmm, why *don't* we just do everything LE, including the ring?
> >>>
> >> Mainly because when requirements are in doubt, simplicity wins, I think.
> >>
> >
> > Well, I think the definition of simplicity is up for debate in this
> > case... "LE everywhere" is much simpler than "it depends", IMHO.
> >
>
> You couldn't use the vringfd direct ring mapping optimization in KVM for
> PPC without teaching the kernel to access a vring in LE format. I'm
> pretty sure the later would get rejected on LKML anyway for vringfd as a
> generic mechanism.
(Since the IA64 guys have already implemented BE guests on LE hosts, they
should be aware of this discussion too, which is why I've CCed them.)
After a short but torturous whiteboard session, followed by a much longer but
less painful discussion, I'm fine with the virtio device config space being
BE for PowerPC and LE for x86.
In the future, we can use a feature bit to indicate that PCI config space
contains an explicit endianness flag. (This will be set to BE or LE, *not*
to "opposite of normal", because "normal" is also too vague.)
--
Hollis Blanchard
IBM Linux Technology Center
More information about the Virtualization
mailing list