qemu-devel
[Top][All Lists]
Advanced

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

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


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH] Check if we really are in userspace
Date: Sat, 11 Mar 2006 16:07:48 +0000
User-agent: KMail/1.9.1

> 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)

This code is only used when !defined(CONFIG_SOFTMMU), ie. usermode emulation.
The i386 code is a leftover of the now-dead qemu-fast. Presumably the ppc code 
was just copied from these.

Paul




reply via email to

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