From patchwork Thu Jun 20 14:44:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 253021 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6C2752C01FC for ; Fri, 21 Jun 2013 01:56:48 +1000 (EST) Received: from localhost ([::1]:32926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upg9L-0001fd-IE for incoming@patchwork.ozlabs.org; Thu, 20 Jun 2013 10:47:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upg70-0006aA-26 for qemu-devel@nongnu.org; Thu, 20 Jun 2013 10:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upg6v-00079V-9t for qemu-devel@nongnu.org; Thu, 20 Jun 2013 10:45:21 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:64350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upg6v-00079P-3k for qemu-devel@nongnu.org; Thu, 20 Jun 2013 10:45:17 -0400 Received: by mail-ee0-f45.google.com with SMTP id c1so3994999eek.4 for ; Thu, 20 Jun 2013 07:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=Okl0vCMB+mRL00SyMINyYcTBqUrkftT2MTbUOlQvhkI=; b=FD9Qa8zl+fSL/57scOWtTG7fzCfwX6nndo4vPY/BXouzXNa7yP9nEr0IwhnUQTNIkS XMIu0IrCLs3n43G2ss5pP2yr3T3CjPZwAUjooa+cdcn6p0RXbbwPXgYCtqxb5MZu3uCx nQMP9zQ4+t1ZLAvRsq04xt2rdL7r9xOAnn629taX2aGJWSWTf+lhTyY7g5b0T+BM/WJc Fdoh07Jecia2OqSylmNmK+aKlOKTvNH0HjsgLsYW8pjleGXoaKUdsS075Kgt0Jjv/bJ2 MJ7vKOHQgB+RHyD4K7vWFAEDjUP2B8tEROgHkwdWz3YZoV7Lje37rytd6aV1UGeLix+z kbYw== X-Received: by 10.14.210.134 with SMTP id u6mr8000870eeo.62.1371739516346; Thu, 20 Jun 2013 07:45:16 -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 y10sm973958eev.3.2013.06.20.07.45.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Jun 2013 07:45:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 20 Jun 2013 16:44:36 +0200 Message-Id: <1371739493-10187-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1371739493-10187-1-git-send-email-pbonzini@redhat.com> References: <1371739493-10187-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22d Subject: [Qemu-devel] [PATCH 08/25] Revert "memory: limit sections in the radix tree to the actual address space size" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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 3a8ef42..0448224 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;