Blame 0023-Revert-memory-Return-1-again-on-reads-from-unsigned-.patch

298366
From 2a93d3dd32386c3522cfa2ee60c9e06a298d1f52 Mon Sep 17 00:00:00 2001
298366
From: Jan Kiszka <jan.kiszka@siemens.com>
298366
Date: Mon, 2 Sep 2013 18:43:31 +0200
298366
Subject: [PATCH] Revert "memory: Return -1 again on reads from unsigned
298366
 regions"
298366
298366
This reverts commit 9b8c69243585a32d14b9bb9fcd52c37b0b5a1b71.
298366
298366
The commit was wrong: We only return -1 on invalid accesses, not on
298366
valid but unbacked ones. This broke various corner cases.
298366
298366
Cc: qemu-stable@nongnu.org
298366
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
298366
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
298366
(cherry picked from commit 68a7439a150d6b4da99082ab454b9328b151bc25)
298366
298366
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
298366
---
298366
 memory.c | 2 +-
298366
 1 file changed, 1 insertion(+), 1 deletion(-)
298366
298366
diff --git a/memory.c b/memory.c
298366
index 886f838..5a10fd0 100644
298366
--- a/memory.c
298366
+++ b/memory.c
298366
@@ -872,7 +872,7 @@ static uint64_t unassigned_mem_read(void *opaque, hwaddr addr,
298366
     if (current_cpu != NULL) {
298366
         cpu_unassigned_access(current_cpu, addr, false, false, 0, size);
298366
     }
298366
-    return -1ULL;
298366
+    return 0;
298366
 }
298366
 
298366
 static void unassigned_mem_write(void *opaque, hwaddr addr,