From patchwork Tue Aug 14 07:41:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 177174 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 621F42C008A for ; Tue, 14 Aug 2012 17:42:12 +1000 (EST) Received: from localhost ([::1]:57588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1BlS-0004KE-81 for incoming@patchwork.ozlabs.org; Tue, 14 Aug 2012 03:42:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1BlL-0004Jz-NG for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:42:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1BlJ-0006gU-IX for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:42:03 -0400 Received: from gate.crashing.org ([63.228.1.57]:48998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1BlJ-0006gC-9t for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:42:01 -0400 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id q7E7fmLg010804; Tue, 14 Aug 2012 02:41:49 -0500 Message-ID: <1344930107.2481.18.camel@pasglop> From: Benjamin Herrenschmidt To: qemu-devel@nongnu.org Date: Tue, 14 Aug 2012 17:41:47 +1000 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 63.228.1.57 Cc: Paul Mackerras , anthony@codemonkey.ws, David Gibson Subject: [Qemu-devel] [PATCH] dma: Fix stupid typo/thinko X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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; } }