* [Qemu-devel] [PATCH] dma: Fix stupid typo/thinko
@ 2012-08-14 7:41 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2012-08-14 7:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Paul Mackerras, anthony, David Gibson
Hi hard a brain fart when coding that function, it will
fail to "set" the memory beyond the first 512 bytes. This
is in turn causing guest crashes in ibmveth (spapr_llan.c
on the qemu side) due to the receive queue not being
properly initialized.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Anthony, I believe this could/should go in ASAP :-)
diff --git a/dma-helpers.c b/dma-helpers.c
index 35cb500..53e47c6 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -24,8 +24,8 @@ static void do_dma_memory_set(dma_addr_t addr, uint8_t c, dma_addr_t len)
while (len > 0) {
l = len < FILLBUF_SIZE ? len : FILLBUF_SIZE;
cpu_physical_memory_rw(addr, fillbuf, l, true);
- len -= len;
- addr += len;
+ len -= l;
+ addr += l;
}
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-14 7:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 7:41 [Qemu-devel] [PATCH] dma: Fix stupid typo/thinko Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).