qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 03/21] RISC-V CPU Core Definition


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 03/21] RISC-V CPU Core Definition
Date: Thu, 11 Jan 2018 06:37:50 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/10/2018 06:21 PM, Michael Clark wrote:
> +static inline void cpu_get_tb_cpu_state(CPURISCVState *env, target_ulong *pc,
> +                                        target_ulong *cs_base, uint32_t 
> *flags)
> +{
> +    *pc = env->pc;
> +    *cs_base = 0;
> +    *flags = 0; /* necessary to avoid compiler warning */
> +}

Actually, at minimum you have to put enough into flags to differentiate machine
vs supervisor vs user mode.  Otherwise you can wind up running a previously
translated block with the wrong permissions.

The patch I saw from Stefan O'Rear would do nicely.


r~



reply via email to

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