qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] virtio-pci: Fix endianness of virtio config


From: Benjamin Herrenschmidt
Subject: Re: [Qemu-devel] [PATCH 1/2] virtio-pci: Fix endianness of virtio config
Date: Wed, 11 Jan 2012 11:32:15 +1100

On Wed, 2012-01-11 at 01:08 +0100, Alexander Graf wrote:
> On 11.01.2012, at 01:07, Anthony Liguori wrote:
> 
> > On 01/10/2012 06:07 PM, Alexander Graf wrote:
> >> From: Benjamin Herrenschmidt<address@hidden>
> >> 
> >> The virtio config area in PIO space is a bit special. The initial
> >> header is little endian but the rest (device specific) is guest
> >> native endian.
> >> 
> >> The PIO accessors for PCI on machines that don't have native IO ports
> >> assume that all PIO is little endian, which works fine for everything
> >> except the above.
> >> 
> >> A complicated way to fix it would be to split the BAR into two memory
> >> regions with different endianess settings, but this isn't practical
> >> to do, besides, the PIO code doesn't honor region endianness anyway
> >> (I have a patch for that too but it isn't necessary at this stage).
> >> 
> >> So I decided to go for the quick fix instead which consists of
> >> reverting the swap in virtio-pci in selected places, hoping that when
> >> we eventually do a "v2" of the virtio protocols, we sort that out once
> >> and for all using a fixed endian setting for everything.
> >> 
> >> Unfortunately, that mean moving virtio-pci from Makefile.objs to
> >> Makefile.target so we can use TARGET_WORDS_BIGENDIAN which would
> >> otherwise be poisoned.
> >> 
> >> Signed-off-by: Benjamin Herrenschmidt<address@hidden>
> >> Signed-off-by: Alexander Graf<address@hidden>
> >> [agraf: keep virtio in libhw and determine endianness through a
> >>         helper function in exec.c]
> > 
> > Both:
> > 
> > Reviewed-by: Anthony Liguori <address@hidden>
> 
> Cool :). Queued up in ppc-next.

Fix the commit log, you aren't moving it to Makefile.target anymore :-)

Cheers,
Ben.





reply via email to

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