Hi Ian,

On 25/03/15 14:22, Ian Campbell wrote:
> -static void vtimer_cntp_tval(struct cpu_user_regs *regs, uint32_t *r, int 
> read)
> +static int vtimer_cntp_tval(struct cpu_user_regs *regs, uint32_t *r, int 
> read)
>  {
>      struct vcpu *v = current;
>      s_time_t now;
>  
> +    if ( psr_mode_is_user(regs) &&
> +         !(READ_SYSREG(CNTKCTL_EL1) & CNTKCTL_EL1_EL0PTEN) )
> +        return 0;
> +

Would it make sense to create a macro for this check? The code is pretty
much the same on every function except the field to check
(EL0PTEN/EL0PCTEN).

Either way:

Reviewed-by:  Julien Grall <julien.gr...@linaro.org>

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to