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

Re: [Xen-devel] [PATCH] xen: arm: vtimer fixes for arm64



On Fri, 2013-12-06 at 17:38 +0000, Stefano Stabellini wrote:
> On Thu, 5 Dec 2013, Ian Campbell wrote:
> > @@ -227,12 +242,18 @@ static int vtimer_emulate_sysreg(struct cpu_user_regs 
> > *regs, union hsr hsr)
> >      {
> >      case CNTP_CTL_EL0:
> >          vtimer_cntp_ctl(regs, &r, sysreg.read);
> > -        *x = r;
> > +        if ( sysreg.read )
> > +            *x = r;
> >          return 1;
> >      case CNTP_TVAL_EL0:
> >          vtimer_cntp_tval(regs, &r, sysreg.read);
> > -        *x = r;
> > +        if ( sysreg.read )
> > +            *x = r;
> >          return 1;
> 
> Are you sure that sysreg.read == 1 means write?

On the contrary, it means read.

Here x points to the guest reg that is the target of the read, and r is
the new value which the emulation has produced.

So *x = r is implementing a read from the guest's PoV.

Ian.


_______________________________________________
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®.