qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Fix unassigned memory access handling


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] Fix unassigned memory access handling
Date: Sun, 03 Jul 2011 09:08:13 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

On 07/03/2011 02:42 AM, Blue Swirl wrote:
>  }
> 
> -void QEMU_NORETURN do_unassigned_access(target_phys_addr_t addr, int 
> is_write,
> -                                        int is_exec, int unused, int size)
> +void QEMU_NORETURN cpu_unassigned_access(CPUState *env1,
> +                                         target_phys_addr_t addr, int 
> is_write,
> +                                         int is_exec, int unused, int size)
>  {
> +    CPUState *saved_env;
> +
> +    saved_env = env;
> +    env = env1;
>      env->trap_arg0 = addr;
>      env->trap_arg1 = is_write;
>      dynamic_excp(EXCP_MCHK, 0);
> +    env = saved_env;
>  }

For Alpha and MIPS, these functions always throw an exception exiting
the cpu loop.  There's no point in saving the old value of ENV.

It's Sparc and Microblaze that only sometimes throw the exception.


r~



reply via email to

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