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

Re: [Xen-devel] [PATCH v2 2/2] xen/arm32: implement VFP context switch



On Mon, 2013-06-03 at 12:10 +0100, Julien Grall wrote:
> On 05/31/2013 03:12 PM, Ian Campbell wrote:
> 
> > On Thu, 2013-05-30 at 17:01 +0100, Julien Grall wrote:
> >> +void vfp_save_state(struct vcpu *v)
> >> +{
> >> +    uint32_t tmp;
> >> +
> >> +    v->arch.vfp.fpexc = READ_CP32(FPEXC);
> > 
> > The docs seem to call for reading this via an explicit VMRS
> > instruction. 
> > 
> > Looking at the ARM ARM this seems to be an alias for the encoding of an
> > MRC instruction corresponding to reading FPEXC as you have done. Did you
> > have a reference for that aliasing? (I'm not finding it in the ARM ARM).
> > 
> > Are you avoiding the mnemonic to avoid issues with binutils providing
> > the instruction?
> > 
> >> +
> >> +    WRITE_CP32(v->arch.vfp.fpexc | FPEXC_EN, FPEXC);
> > 
> > This being a CP write, do we need an isb? Will this write complete
> > before the following read from FPSCR otherwise?
> 
> 
> In fact, isb seems to be unnecessary:
> "Writes to the FPEXC can have side-effects on various aspects of
> processor operation. All of these side-effects are
> synchronous to the FPEXC write. This means they are guaranteed not to be
> visible to earlier instructions in the
> execution stream, and they are guaranteed to be visible to later
> instructions in the execution stream."

Excellent, thanks for tracking down those words ;-)

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