From: Philippe Mathieu-Daudé <[email protected]> Fix copy/paste error writing to the ATU_UPPER_TARGET register, we want to update the upper 32 bits.
Cc: [email protected] Reported-by: Joey <[email protected]> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2861 Fixes: d64e5eabc4c ("pci: Add support for Designware IP block") Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Gustavo Romero <[email protected]> Message-Id: <[email protected]> (cherry picked from commit 04e99f9eb7920b0f0fcce65686c3bedf5e32a1f9) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c index c3fc37b904..cc3ff0a45a 100644 --- a/hw/pci-host/designware.c +++ b/hw/pci-host/designware.c @@ -362,7 +362,7 @@ static void designware_pcie_root_config_write(PCIDevice *d, uint32_t address, case DESIGNWARE_PCIE_ATU_UPPER_TARGET: viewport->target &= 0x00000000FFFFFFFFULL; - viewport->target |= val; + viewport->target |= (uint64_t)val << 32; break; case DESIGNWARE_PCIE_ATU_LIMIT: -- 2.39.5
