qemu/hw/pci-host
Rakesh Jeyasingh e5894fd6f4 hw/pci-host/gt64120: Fix endianness handling
The GT-64120 PCI controller requires special handling where:
1. Host bridge(bus 0 ,device 0) must never be byte-swapped
2. Other devices follow MByteSwap bit in GT_PCI0_CMD

The previous implementation incorrectly  swapped all accesses, breaking
host bridge detection (lspci -d 11ab:4620).

Changes made:
1. Removed gt64120_update_pci_cfgdata_mapping() and moved data_mem initialization
  to gt64120_realize() for cleaner setup
2. Implemented custom read/write handlers that:
   - Preserve host bridge accesses (extract32(config_reg,11,13)==0)
   - apply swapping only for non-bridge devices in big-endian mode

Fixes: 145e2198 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2826

Signed-off-by: Rakesh Jeyasingh <rakeshjb010@gmail.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/20250429170354.150581-2-rakeshjb010@gmail.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-20 08:04:18 +02:00
..
articia.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
astro.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
bonito.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
designware.c hw/pci-host/designware: Fix viewport configuration 2025-05-06 15:02:35 +01:00
dino.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
fsl_imx8m_phy.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
gpex-acpi.c hw/pci-host/gpex-acpi: Fix typo in comment 2025-05-09 23:49:26 +03:00
gpex.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
grackle.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
gt64120.c hw/pci-host/gt64120: Fix endianness handling 2025-05-20 08:04:18 +02:00
i440fx.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
Kconfig hw/arm/fsl-imx8mp: Add PCIe support 2025-02-25 17:02:34 +00:00
meson.build hw/arm/fsl-imx8mp: Add PCIe support 2025-02-25 17:02:34 +00:00
mv643xx.h mv64361: Add dummy gigabit ethernet PHY access registers 2023-07-07 04:18:26 -03:00
mv64361.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pam.c hw/pci-host/pam: Make init_pam() usage more readable 2023-05-19 10:30:46 -04:00
pnv_phb.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_phb.h include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
pnv_phb3.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_phb3_msi.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_phb3_pbcq.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_phb4.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_phb4_pec.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
ppc4xx_pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
ppc440_pcix.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ppce500.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
q35.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
raven.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
remote.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sabre.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
sh_pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
trace-events hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/ 2024-02-22 12:47:40 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uninorth.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
versatile.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
xen_igd_pt.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
xilinx-pcie.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00