From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHdBs-0001Wz-1J for qemu-devel@nongnu.org; Thu, 05 Sep 2013 13:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHdBm-00013z-Gb for qemu-devel@nongnu.org; Thu, 05 Sep 2013 13:17:55 -0400 Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 5 Sep 2013 19:17:34 +0200 Message-Id: <1378401455-583-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1378401455-583-1-git-send-email-pbonzini@redhat.com> References: <1378401455-583-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 4/5] 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@nongnu.org Cc: Jan Kiszka , qemu-stable@nongnu.org, anthony@codemonkey.ws 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. Cc: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.8.3.1