Received: from eggs.gnu.org ([2001:4830:134:3::10]:36504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiA1K-0003ON-K8 for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiA1F-0001g4-VW for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:26 -0400 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:44756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiA1F-0001fx-L6 for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:21 -0400 Received: by mail-ea0-f182.google.com with SMTP id r16so844824ead.13 for ; Thu, 30 May 2013 14:04:20 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id y2sm62707218eeu.2.2013.05.30.14.04.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 14:04:20 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 30 May 2013 23:03:43 +0200 Message-Id: <1369947836-2638-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1369947836-2638-1-git-send-email-pbonzini@redhat.com> References: <1369947836-2638-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 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 --- memory.c | 3 ++- 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) { -- 1.7.4.1