mirror of https://github.com/xemu-project/xemu.git
fixed mmu fault priviledge logic
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@406 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
db8d746688
commit
93a40ea926
|
@ -225,7 +225,7 @@ int cpu_exec(CPUState *env1)
|
||||||
cpu_arm_dump_state(env, logfile, 0);
|
cpu_arm_dump_state(env, logfile, 0);
|
||||||
env->cpsr &= ~0xf0000000;
|
env->cpsr &= ~0xf0000000;
|
||||||
#elif defined(TARGET_SPARC)
|
#elif defined(TARGET_SPARC)
|
||||||
cpu_sparc_dump_state (env, logfile, 0);
|
cpu_sparc_dump_state (env, logfile, 0);
|
||||||
#else
|
#else
|
||||||
#error unsupported target CPU
|
#error unsupported target CPU
|
||||||
#endif
|
#endif
|
||||||
|
@ -273,6 +273,7 @@ int cpu_exec(CPUState *env1)
|
||||||
tb->tc_ptr = tc_ptr;
|
tb->tc_ptr = tc_ptr;
|
||||||
tb->cs_base = (unsigned long)cs_base;
|
tb->cs_base = (unsigned long)cs_base;
|
||||||
tb->flags = flags;
|
tb->flags = flags;
|
||||||
|
/* XXX: an MMU exception can occur here */
|
||||||
cpu_gen_code(env, tb, CODE_GEN_MAX_SIZE, &code_gen_size);
|
cpu_gen_code(env, tb, CODE_GEN_MAX_SIZE, &code_gen_size);
|
||||||
*ptb = tb;
|
*ptb = tb;
|
||||||
tb->hash_next = NULL;
|
tb->hash_next = NULL;
|
||||||
|
@ -456,7 +457,8 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/* see if it is an MMU fault */
|
/* see if it is an MMU fault */
|
||||||
ret = cpu_x86_handle_mmu_fault(env, address, is_write);
|
ret = cpu_x86_handle_mmu_fault(env, address, is_write,
|
||||||
|
((env->hflags & HF_CPL_MASK) == 3), 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return 0; /* not an MMU fault */
|
return 0; /* not an MMU fault */
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
|
|
Loading…
Reference in New Issue