]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commitdiff
Revert "memory: Return -1 again on reads from unsigned regions"
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 2 Sep 2013 16:43:31 +0000 (18:43 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 25 Sep 2013 03:31:53 +0000 (22:31 -0500)
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 <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 68a7439a150d6b4da99082ab454b9328b151bc25)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
memory.c

index 886f8389511641a9820893cf2f4e6739c5dbe8ee..5a10fd0bde229f8d1a7cea5a7158259131cdd16d 100644 (file)
--- 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,