From patchwork Sat Aug 3 08:31:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 264394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D64962C0090 for ; Sat, 3 Aug 2013 18:31:49 +1000 (EST) Received: from localhost ([::1]:33529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5XFb-0004C3-WE for incoming@patchwork.ozlabs.org; Sat, 03 Aug 2013 04:31:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5XFE-00042N-Lu for qemu-devel@nongnu.org; Sat, 03 Aug 2013 04:31:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5XF7-0005kS-3d for qemu-devel@nongnu.org; Sat, 03 Aug 2013 04:31:24 -0400 Received: from mout.web.de ([212.227.17.12]:60814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5XF6-0005kK-Qt for qemu-devel@nongnu.org; Sat, 03 Aug 2013 04:31:17 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.58.223]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0M0hcE-1UBu7Z37iY-00utV3 for ; Sat, 03 Aug 2013 10:31:16 +0200 Message-ID: <51FCBFD2.3030401@web.de> Date: Sat, 03 Aug 2013 10:31:14 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Paolo Bonzini References: <51FCBF4E.90605@web.de> In-Reply-To: <51FCBF4E.90605@web.de> X-Enigmail-Version: 1.5.2 X-Provags-ID: V03:K0:2WjG0LgNFQAqKRGWDH0OFVYfNO2OGVl8mKMWMlnkMxqP0PsEjYa bwRKgCRn7xk2EQsBdzVzGPpbwu10QqnRzjZA/Kkm6o43N+RimK2yqXh6I2k1iPhA4Gu+YrE loWI1F1140o59RZQrChXlWbcU4OaWSmsc8E8VssylAS+sXiR2lVmuRO+YeKP2Xkyu1I/Ry6 AIa/pzhT8gh7Sf7q819ew== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.12 Cc: qemu-devel , =?ISO-8859-1?Q?Andreas_F=E4rber?= Subject: [Qemu-devel] [PATCH 2/2] Revert "memory: Return -1 again on reads from unsigned regions" 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 From: Jan Kiszka This reverts commit 9b8c69243585a32d14b9bb9fcd52c37b0b5a1b71. The commit was wrong: We only return -1 on invalid accesses, not on valid but unbacked ones. This broke various corner cases. Signed-off-by: Jan Kiszka Reviewed-by: Peter Maydell --- memory.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/memory.c b/memory.c index ac6f3c6..7a0251d 100644 --- a/memory.c +++ b/memory.c @@ -873,7 +873,7 @@ static uint64_t unassigned_mem_read(void *opaque, hwaddr addr, if (current_cpu != NULL) { cpu_unassigned_access(current_cpu, addr, false, false, 0, size); } - return -1ULL; + return 0; } static void unassigned_mem_write(void *opaque, hwaddr addr,