vfio: make rom read endian sensitive
commit75bd0c7253f384e868b638db5c6350796cf584f7
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Mon, 22 Sep 2014 21:27:43 +0000 (22 15:27 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 22 Sep 2014 21:27:43 +0000 (22 15:27 -0600)
treef7c2556100d23bfe2d7da07c896d4e3d8a3272a7
parent6758008e2c4e79fb6bd04fe8e7a41665fa583965
vfio: make rom read endian sensitive

All memory regions used by VFIO are LITTLE_ENDIAN and they
already take care of endiannes when accessing real device BARs
except ROM - it was broken on BE hosts.

This fixes endiannes for ROM BARs the same way as it is done
for other BARs.

This has been tested on PPC64 BE/LE host/guest in all possible
combinations including TCG.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
[aik: added commit log]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/misc/vfio.c