qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: sparc32 do_unassigned_access overhaul v2


From: Blue Swirl
Subject: [Qemu-devel] Re: sparc32 do_unassigned_access overhaul v2
Date: Mon, 18 Jan 2010 17:38:49 +0000

On Mon, Jan 18, 2010 at 4:17 PM, Artyom Tarasenko
<address@hidden> wrote:
> Btw, what is the following hack for in do_unassigned_access?
>
>
>    saved_env = env;
>    env = cpu_single_env;
> //...
>    env = saved_env;

env is a host CPU register, see for example target-sparc/exec.h. Code
which is called directly from translated code (and cpu-exec.c) is
compiled this way.

I'm not sure if do_unassigned_access will ever be called from outside
of translated code, grep hits were from exec.c, cpu-exec.c and
op_helper.c.

> I wonder whether I modify the correct env here:
>
>   env = saved_env;
>
> +    /* flush neverland mappings created during no-fault mode,
> +       so the sequential MMU faults report proper fault types */
> +    if (env->mmuregs[0] & MMU_NF) {
> +        tlb_flush(env, 1);
> +    }

Right, if env was NULL when entering the function, it will crash.




reply via email to

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