diff mbox series

[PATCH-for-10.0,1/2] hw/pci-host/designware: Fix access to ATU_UPPER_TARGET register

Message ID 20250331152041.74533-2-philmd@linaro.org
State Superseded
Headers show
Series hw/pci-host/designware: Fix ATU_UPPER_TARGET register access | expand

Commit Message

Philippe Mathieu-Daudé March 31, 2025, 3:20 p.m. UTC
Fix copy/paste error writing to the ATU_UPPER_TARGET
register, we want to update the upper 32 bits.

Cc: qemu-stable@nongnu.org
Reported-by: Joey <jeundery@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2861
Fixes: d64e5eabc4c ("pci: Add support for Designware IP block")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/pci-host/designware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gustavo Romero March 31, 2025, 4:15 p.m. UTC | #1
Hi Phil,

On 3/31/25 12:20, Philippe Mathieu-Daudé wrote:
> Fix copy/paste error writing to the ATU_UPPER_TARGET
> register, we want to update the upper 32 bits.
> 
> Cc: qemu-stable@nongnu.org
> Reported-by: Joey <jeundery@gmail.com>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2861
> Fixes: d64e5eabc4c ("pci: Add support for Designware IP block")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/pci-host/designware.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
> index c07740bfaa4..5598d18f478 100644
> --- a/hw/pci-host/designware.c
> +++ b/hw/pci-host/designware.c
> @@ -371,7 +371,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:

Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>


Cheers,
Gustavo
diff mbox series

Patch

diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index c07740bfaa4..5598d18f478 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -371,7 +371,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: