Received: from eggs.gnu.org ([2001:4830:134:3::10]:40209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiAE7-0005Fm-NS for qemu-devel@nongnu.org; Thu, 30 May 2013 17:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiAE2-0006K6-Ko for qemu-devel@nongnu.org; Thu, 30 May 2013 17:17:39 -0400 Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:61758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiAE2-0006K2-E3 for qemu-devel@nongnu.org; Thu, 30 May 2013 17:17:34 -0400 Received: by mail-ea0-f174.google.com with SMTP id z7so867354eaf.5 for ; Thu, 30 May 2013 14:17:33 -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 s8sm62773732eeo.4.2013.05.30.14.17.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 14:17:32 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 30 May 2013 23:16:55 +0200 Message-Id: <1369948629-2833-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1369948629-2833-1-git-send-email-pbonzini@redhat.com> References: <1369948629-2833-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 07/21] Revert "memory: limit sections in the radix tree to the actual address space size" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This reverts commit 86a8623692b1b559a419a92eb8b6897c221bca74. Signed-off-by: Paolo Bonzini --- exec.c | 13 +------------ include/exec/memory.h | 3 --- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/exec.c b/exec.c index 2a81b6e..e3a08d6 100644 --- a/exec.c +++ b/exec.c @@ -835,21 +835,10 @@ static void register_multipage(AddressSpaceDispatch *d, MemoryRegionSection *sec section_index); } -QEMU_BUILD_BUG_ON(TARGET_PHYS_ADDR_SPACE_BITS > MAX_PHYS_ADDR_SPACE_BITS) - -static MemoryRegionSection limit(MemoryRegionSection section) -{ - section.size = MIN(section.offset_within_address_space + section.size, - MAX_PHYS_ADDR + 1) - - section.offset_within_address_space; - - return section; -} - static void mem_add(MemoryListener *listener, MemoryRegionSection *section) { AddressSpaceDispatch *d = container_of(listener, AddressSpaceDispatch, listener); - MemoryRegionSection now = limit(*section), remain = limit(*section); + MemoryRegionSection now = *section, remain = *section; if ((now.offset_within_address_space & ~TARGET_PAGE_MASK) || (now.size < TARGET_PAGE_SIZE)) { diff --git a/include/exec/memory.h b/include/exec/memory.h index c747f67..c11a3f8 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -26,9 +26,6 @@ #include "exec/ioport.h" #include "qemu/int128.h" -#define MAX_PHYS_ADDR_SPACE_BITS 62 -#define MAX_PHYS_ADDR (((hwaddr)1 << MAX_PHYS_ADDR_SPACE_BITS) - 1) - typedef struct MemoryRegionOps MemoryRegionOps; typedef struct MemoryRegionPortio MemoryRegionPortio; typedef struct MemoryRegionMmio MemoryRegionMmio; -- 1.8.1.4