diff options
author | Avi Kivity <avi@redhat.com> | 2011-12-19 13:18:13 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-01-03 19:19:28 +0200 |
commit | cc4aa8307c83111a0c804ae3eaf1e63f220c682e (patch) | |
tree | d90a78733f9f1b7c837ab769f7e69f66e84669b0 /target-sparc | |
parent | b7c28c74af51e07fc457fef47ac4ec6b1e654d2c (diff) | |
download | qemu-cc4aa8307c83111a0c804ae3eaf1e63f220c682e.zip qemu-cc4aa8307c83111a0c804ae3eaf1e63f220c682e.tar.gz qemu-cc4aa8307c83111a0c804ae3eaf1e63f220c682e.tar.bz2 |
sparc: avoid cpu_get_physical_page_desc()
This reaches into the innards of the memory core, which are being
changed. Switch to a memory API version.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'target-sparc')
-rw-r--r-- | 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..bdff1c3 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.size) { return -1; } return phys_addr; |