aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-05-24 13:55:52 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-05-29 16:26:58 +0200
commit2cdfcf272d1a38e22879aecae83e95be51369b2d (patch)
treec2bec009bfba763e081664e9278a17a1069b50ec
parentd197063fcf969e1269dc53c9c9e9a073f87aa3b4 (diff)
downloadqemu-2cdfcf272d1a38e22879aecae83e95be51369b2d.zip
qemu-2cdfcf272d1a38e22879aecae83e95be51369b2d.tar.gz
qemu-2cdfcf272d1a38e22879aecae83e95be51369b2d.tar.bz2
memory: assign MemoryRegionOps to all regions
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>
-rw-r--r--memory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index 2e4f547..f2135d1 100644
--- 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) {