Received: from eggs.gnu.org ([2001:4830:134:3::10]:36566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiA1S-0003ey-Et for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiA1N-0001hY-Rs for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:34 -0400 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:60991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiA1N-0001hQ-Lw for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:29 -0400 Received: by mail-ea0-f175.google.com with SMTP id h14so851575eaj.6 for ; Thu, 30 May 2013 14:04:29 -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.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 14:04:28 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 30 May 2013 23:03:47 +0200 Message-Id: <1369947836-2638-14-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 13/22] memory: export memory_region_access_valid to exec.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org We'll use it to implement address_space_access_valid. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/exec/memory-internal.h | 3 +++ memory.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index c18b36c..799c02a 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -45,6 +45,9 @@ void address_space_destroy_dispatch(AddressSpace *as); extern const MemoryRegionOps unassigned_mem_ops; +bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr, + unsigned size, bool is_write); + ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, MemoryRegion *mr); ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr); diff --git a/memory.c b/memory.c index f2135d1..9e1c1a3 100644 --- a/memory.c +++ b/memory.c @@ -851,10 +851,10 @@ const MemoryRegionOps unassigned_mem_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static bool memory_region_access_valid(MemoryRegion *mr, - hwaddr addr, - unsigned size, - bool is_write) +bool memory_region_access_valid(MemoryRegion *mr, + hwaddr addr, + unsigned size, + bool is_write) { if (mr->ops->valid.accepts && !mr->ops->valid.accepts(mr->opaque, addr, size, is_write)) { -- 1.7.4.1