From: Tsuneo Saito Date: Thu, 21 Jul 2011 15:16:31 +0000 (+0900) Subject: SPARC64: fix fault status overwritten on nonfaulting load X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~5636^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=103dcbe581524ba777ccee1ca8ef7c3838c4d4de;p=sdk%2Femulator%2Fqemu.git SPARC64: fix fault status overwritten on nonfaulting load cpu_get_phys_page_nofault() calls get_physical_address() twice, that results in overwriting the fault status in the SFSR. We need this change in order for nonfaulting loads to raising MMU faults as normal loads do. Also removed the call to cpu_get_physical_page_desc() since we are going to modify nonfaulting loads raising MMU faults. Signed-off-by: Tsuneo Saito Signed-off-by: Blue Swirl --- diff --git a/target-sparc/helper.c b/target-sparc/helper.c index cb8d706..b6e62a7 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -752,13 +752,9 @@ target_phys_addr_t cpu_get_phys_page_nofault(CPUState *env, target_ulong addr, { target_phys_addr_t phys_addr; - 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) + if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != 0) { return -1; + } return phys_addr; } #endif