qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] dma/rc4030: Fix off-by-one error in specifi


From: Hervé Poussineau
Subject: Re: [Qemu-devel] [PATCH 1/2] dma/rc4030: Fix off-by-one error in specified memory region size
Date: Tue, 2 Jul 2019 06:43:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

Le 25/06/2019 à 16:27, Aleksandar Markovic a écrit :
From: Aleksandar Markovic <address@hidden>

The size is one byte less than it should be:

address-space: rc4030-dma
   0000000000000000-00000000fffffffe (prio 0, i/o): rc4030.dma

rc4030 is used in MIPS Jazz board context.

Signed-off-by: Aleksandar Markovic <address@hidden>

Reviewed-by: Hervé Poussineau <address@hidden>

---
  hw/dma/rc4030.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index 6ccafec..88ff271 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -23,6 +23,7 @@
   */
#include "qemu/osdep.h"
+#include "qemu/units.h"
  #include "hw/hw.h"
  #include "hw/mips/mips.h"
  #include "hw/sysbus.h"
@@ -678,7 +679,7 @@ static void rc4030_realize(DeviceState *dev, Error **errp)
memory_region_init_iommu(&s->dma_mr, sizeof(s->dma_mr),
                               TYPE_RC4030_IOMMU_MEMORY_REGION,
-                             o, "rc4030.dma", UINT32_MAX);
+                             o, "rc4030.dma", 4 * GiB);
      address_space_init(&s->dma_as, MEMORY_REGION(&s->dma_mr), "rc4030-dma");
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]