Received: from eggs.gnu.org ([208.118.235.92]:45915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfvRm-0006cc-5k for qemu-devel@nongnu.org; Fri, 24 May 2013 13:06:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfvRg-00021j-0N for qemu-devel@nongnu.org; Fri, 24 May 2013 13:06:30 -0400 Received: from mail-ee0-f42.google.com ([74.125.83.42]:56989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfvRf-00021Q-RF for qemu-devel@nongnu.org; Fri, 24 May 2013 13:06:23 -0400 Received: by mail-ee0-f42.google.com with SMTP id c50so2737041eek.15 for ; Fri, 24 May 2013 10:06:23 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 24 May 2013 19:05:44 +0200 Message-Id: <1369415157-8953-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1369415157-8953-1-git-send-email-pbonzini@redhat.com> References: <1369415157-8953-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 09/22] memory: assign MemoryRegionOps to all regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org This allows to remove the checks on section->readonly. Write accesses to ROM will not be considered "direct" even in exec.c, and will go through mr->ops just like TCG does. Signed-off-by: Paolo Bonzini --- memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 1.8.1.4