From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7lOb-0005ot-7J for qemu-devel@nongnu.org; Fri, 09 Aug 2013 08:02:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7lOV-0007h9-45 for qemu-devel@nongnu.org; Fri, 09 Aug 2013 08:02:16 -0400 Received: from goliath.siemens.de ([192.35.17.28]:26812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7lOU-0007gv-PY for qemu-devel@nongnu.org; Fri, 09 Aug 2013 08:02:11 -0400 From: Jan Kiszka Date: Fri, 9 Aug 2013 14:01:49 +0200 Message-Id: <2f195665d6707ea875d385abce84c845f116a275.1376049708.git.jan.kiszka@siemens.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH for 1.6 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: qemu-devel , Anthony Liguori Cc: Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Peter Maydell 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 886f838..5a10fd0 100644 --- a/memory.c +++ b/memory.c @@ -872,7 +872,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