]> git.proxmox.com Git - mirror_qemu.git/commitdiff
memory: assign MemoryRegionOps to all regions
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 May 2013 11:55:52 +0000 (13:55 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 29 May 2013 14:26:58 +0000 (16:26 +0200)
This allows to remove the checks on section->readonly.  Simply,
write accesses to ROM will not be considered "direct" and will
go through mr->ops without any special intervention.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory.c

index 2e4f547261b47ad6cc35f77df2c4c79d9afd3db2..f2135d1de0b883941d561a5305cbf48005c9aff8 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -788,7 +788,8 @@ void memory_region_init(MemoryRegion *mr,
                         const char *name,
                         uint64_t size)
 {
-    mr->ops = NULL;
+    mr->ops = &unassigned_mem_ops;
+    mr->opaque = NULL;
     mr->parent = NULL;
     mr->size = int128_make64(size);
     if (size == UINT64_MAX) {