aboutsummaryrefslogtreecommitdiff
path: root/hw/mcf5206.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-01-10 01:35:11 +0000
committerAlexander Graf <agraf@suse.de>2012-01-21 05:17:01 +0100
commit82afa58641b0e67abbaf4da6c325ebd7c2513262 (patch)
tree9e0f2e91ce9e53518b9aecc7e214594ba6d806ed /hw/mcf5206.c
parent34ba1dc8739196c771281b0ba38c2ccd32c6d1fe (diff)
virtio-pci: Fix endianness of virtio config
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. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Alexander Graf <agraf@suse.de> [agraf: keep virtio in libhw and determine endianness through a helper function in exec.c] Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/mcf5206.c')
0 files changed, 0 insertions, 0 deletions