提交 2cdfcf27 编写于 作者: P Paolo Bonzini

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: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 d197063f
...@@ -788,7 +788,8 @@ void memory_region_init(MemoryRegion *mr, ...@@ -788,7 +788,8 @@ void memory_region_init(MemoryRegion *mr,
const char *name, const char *name,
uint64_t size) uint64_t size)
{ {
mr->ops = NULL; mr->ops = &unassigned_mem_ops;
mr->opaque = NULL;
mr->parent = NULL; mr->parent = NULL;
mr->size = int128_make64(size); mr->size = int128_make64(size);
if (size == UINT64_MAX) { if (size == UINT64_MAX) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册