From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcdyq-0002ws-0z for qemu-devel@nongnu.org; Mon, 19 Dec 2011 09:14:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rcdyi-0001w3-Vk for qemu-devel@nongnu.org; Mon, 19 Dec 2011 09:14:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcdyi-0001vE-Na for qemu-devel@nongnu.org; Mon, 19 Dec 2011 09:14:08 -0500 From: Avi Kivity Date: Mon, 19 Dec 2011 16:13:43 +0200 Message-Id: <1324304024-11220-23-git-send-email-avi@redhat.com> In-Reply-To: <1324304024-11220-1-git-send-email-avi@redhat.com> References: <1324304024-11220-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH 22/23] sparc: avoid cpu_get_physical_page_desc() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini , qemu-devel@nongnu.org, "Michael S. Tsirkin" Cc: xen-devel@lists.xensource.com, kvm@vger.kernel.org This reaches into the innards of the memory core, which are being changed. Switch to a memory API version. Signed-off-by: Avi Kivity --- target-sparc/mmu_helper.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c index 8cdc224..eec8947 100644 --- a/target-sparc/mmu_helper.c +++ b/target-sparc/mmu_helper.c @@ -19,6 +19,7 @@ #include "cpu.h" #include "trace.h" +#include "exec-memory.h" /* Sparc MMU emulation */ @@ -839,13 +840,15 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr) { target_phys_addr_t phys_addr; int mmu_idx = cpu_mmu_index(env); + MemoryRegionSection section; if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) != 0) { if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != 0) { return -1; } } - if (cpu_get_physical_page_desc(phys_addr) == IO_MEM_UNASSIGNED) { + section = memory_region_find(get_system_memory(), phys_addr, 1); + if (!section.mr) { return -1; } return phys_addr; -- 1.7.7.1