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

Re: [Xen-devel] [PATCH 06/12] xen: arm: correctly handle vtimer traps from userspace



On Wed, 2015-03-25 at 18:41 +0000, Julien Grall wrote:
> 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).

It might, I'll have a go.

> 
> Either way:
> 
> Reviewed-by:  Julien Grall <julien.grall@xxxxxxxxxx>
> 
> Regards,
> 



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.