From: Matt Redfearn Date: Tue, 15 Aug 2017 14:44:17 +0000 (+0100) Subject: PCI: PCIe access should always be little endian X-Git-Tag: v2.11.0-rc0~51^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6c242aaf52409ea827665e6f5f84b446d17a859;p=thirdparty%2Fqemu.git PCI: PCIe access should always be little endian PCIe busses are always little endian, so set the endianness of the memory region to little endian rather than native such that operations work as expected on big endian targets. Signed-off-by: Matt Redfearn Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/pci/pcie_host.c b/hw/pci/pcie_host.c index dcebf57ed45..553db56778b 100644 --- a/hw/pci/pcie_host.c +++ b/hw/pci/pcie_host.c @@ -81,7 +81,7 @@ static uint64_t pcie_mmcfg_data_read(void *opaque, static const MemoryRegionOps pcie_mmcfg_ops = { .read = pcie_mmcfg_data_read, .write = pcie_mmcfg_data_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void pcie_host_init(Object *obj)