qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Check if we really are in userspace


From: Thiemo Seufer
Subject: [Qemu-devel] [PATCH] Check if we really are in userspace
Date: Thu, 16 Feb 2006 16:41:10 +0000
User-agent: Mutt/1.5.11+cvs20060126

Hello All,

this tests for MIPS if we are in userspace when handling a TLB fault.
For some of the other architectures this may also be a bug, only
ppc and x86 handle this so far.


Thiemo


Index: cpu-exec.c
===================================================================
RCS file: /sources/qemu/qemu/cpu-exec.c,v
retrieving revision 1.73
diff -u -p -r1.73 cpu-exec.c
--- cpu-exec.c  8 Feb 2006 22:43:39 -0000       1.73
+++ cpu-exec.c  16 Feb 2006 15:21:03 -0000
@@ -1089,7 +1089,9 @@ static inline int handle_cpu_signal(unsi
     }
 
     /* see if it is an MMU fault */
-    ret = cpu_mips_handle_mmu_fault(env, address, is_write, 1, 0);
+    ret = cpu_mips_handle_mmu_fault(env, address, is_write,
+                                   ((env->hflags & MIPS_HFLAG_MODE)
+                                    == MIPS_HFLAG_UM), 0);
     if (ret < 0)
         return 0; /* not an MMU fault */
     if (ret == 0)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]