From: Paolo Bonzini Date: Fri, 24 May 2013 11:55:52 +0000 (+0200) Subject: memory: assign MemoryRegionOps to all regions X-Git-Tag: qemu-xen-4.4.0-rc1~6^2~343^2~13 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2cdfcf272d1a38e22879aecae83e95be51369b2d;p=qemu-upstream-4.5-testing.git 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 Signed-off-by: Paolo Bonzini --- diff --git a/memory.c b/memory.c index 2e4f54726..f2135d1de 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) {