summaryrefslogtreecommitdiff
path: root/cpu-common.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2011-11-30 16:26:21 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-15 09:27:23 -0600
commit56384e8b1eebac750e6186f5041af710433ddc9e (patch)
tree978f8b20d21e626cd5b94a76ce4b701381098988 /cpu-common.h
parent15d37e709fa809f1b64d3ad81965f3d8200e828a (diff)
downloadqemu-56384e8b1eebac750e6186f5041af710433ddc9e.tar.gz
qemu-56384e8b1eebac750e6186f5041af710433ddc9e.tar.bz2
qemu-56384e8b1eebac750e6186f5041af710433ddc9e.zip
exec.c: Fix subpage memory access to RAM MemoryRegion
Commit 95c318f5e1f88d7e5bcc6deac17330fd4806a2d3 (Fix segfault in mmio subpage handling code.) prevented a segfault by making all subpage registrations over an existing memory page perform an unassigned access. Symptoms were writes not taking effect and reads returning zero. Very small page sizes are not currently supported either, so subpage memory areas cannot fully be avoided. Therefore change the previous fix to use a new IO_MEM_SUBPAGE_RAM instead of IO_MEM_UNASSIGNED. Suggested by Avi. Reviewed-by: Avi Kivity <avi@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Avi Kivity <avi@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'cpu-common.h')
-rw-r--r--cpu-common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpu-common.h b/cpu-common.h
index 7c9cef85b3..48f4c01a3f 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -172,6 +172,7 @@ void cpu_physical_memory_write_rom(target_phys_addr_t addr,
#define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */
#define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT)
#define IO_MEM_NOTDIRTY (3 << IO_MEM_SHIFT)
+#define IO_MEM_SUBPAGE_RAM (4 << IO_MEM_SHIFT)
/* Acts like a ROM when read and like a device when written. */
#define IO_MEM_ROMD (1)