From mboxrd@z Thu Jan 1 00:00:00 1970 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 MIME-Version: 1.0 References: <51FCBF4E.90605@web.de> In-Reply-To: <51FCBF4E.90605@web.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/2] Revert "memory: Return -1 again on reads from unsigned regions" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel , =?ISO-8859-1?Q?Andreas_F=E4rber?= 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 --- 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, -- 1.7.3.4