xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Stefano.Stabellini@eu.citrix.com, tim@xen.org,
	patches@linaro.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v2 2/2] xen/arm32: implement VFP context switch
Date: Mon, 03 Jun 2013 12:10:08 +0100	[thread overview]
Message-ID: <51AC7990.4020400@linaro.org> (raw)
In-Reply-To: <1370009536.5199.171.camel@zakaz.uk.xensource.com>

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

-- 
Julien

  parent reply	other threads:[~2013-06-03 11:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 16:01 [PATCH v2 0/2] Implement VFP context switch for arm32 Julien Grall
2013-05-30 16:01 ` [PATCH v2 1/2] xen/arm: don't enable VFP on XEN during the boot Julien Grall
2013-05-30 16:01 ` [PATCH v2 2/2] xen/arm32: implement VFP context switch Julien Grall
2013-05-31 14:12   ` Ian Campbell
2013-05-31 15:27     ` Julien Grall
2013-05-31 15:54       ` Ian Campbell
2013-06-03 11:14         ` Julien Grall
2013-06-03 11:25           ` Ian Campbell
2013-06-03 11:10     ` Julien Grall [this message]
2013-06-03 11:23       ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51AC7990.4020400@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=patches@linaro.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).