]> Git Repo - qemu.git/commitdiff
SPARC64: fix fault status overwritten on nonfaulting load
authorTsuneo Saito <[email protected]>
Thu, 21 Jul 2011 15:16:31 +0000 (00:16 +0900)
committerBlue Swirl <[email protected]>
Thu, 21 Jul 2011 20:01:48 +0000 (20:01 +0000)
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 <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
target-sparc/helper.c

index cb8d706f78abcbebc65fc21c9067819b2644798a..b6e62a78c29096e84bf346749ced7c243733c251 100644 (file)
@@ -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
This page took 0.028556 seconds and 4 git commands to generate.