From: Julien Grall <julien.grall@linaro.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
tim@xen.org, ian.campbell@citrix.com,
stefano.stabellini@citrix.com
Subject: Re: [PATCH v2 for 4.5] arm32: fix build after 063188f4b3
Date: Mon, 13 Oct 2014 18:05:06 +0100 [thread overview]
Message-ID: <543C0642.2020002@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1410131752530.17038@kaball.uk.xensource.com>
On 10/13/2014 06:01 PM, Stefano Stabellini wrote:
> On Mon, 13 Oct 2014, Julien Grall wrote:
>> Hi Stefano,
>>
>> On 10/13/2014 05:06 PM, Stefano Stabellini wrote:
>>>> +int do_smc(register_t function_id, ...);
>>>
>>> I am not sure whether this is safe: the smc calling convention on arm64
>>> doesn't promise to save the x0-x17 registers. The smc calling convention
>>> on arm32 only promises to save r4-r15. That means that after issuing an
>>> smc call with just two arguments, you could still find r3 to be changed
>>> afterwards.
>>> I think you'll have to manually save/restore all the registers outside
>>> the safety guarantees of the smc protocol.
>>
>> The calling convention specifies:
>> - r0-r3 as argument/scratch register on ARM32
>> - x0-x17 as argument/temporary register on ARM64
>>
>> So we don't need to save/restore them before/after calling the SMC function.
>
> I think you are right.
I will resend a patch with Jan comments.
--
Julien Grall
next prev parent reply other threads:[~2014-10-13 17:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 15:29 [PATCH v2 for 4.5] arm32: fix build after 063188f4b3 Julien Grall
2014-10-13 15:39 ` Julien Grall
2014-10-13 15:49 ` Jan Beulich
2014-10-13 16:05 ` Julien Grall
2014-10-13 15:51 ` Jan Beulich
2014-10-13 16:05 ` Julien Grall
2014-10-13 16:06 ` Stefano Stabellini
2014-10-13 16:49 ` Julien Grall
2014-10-13 17:01 ` Stefano Stabellini
2014-10-13 17:05 ` Julien Grall [this message]
2014-10-14 9:15 ` Ian Campbell
2014-10-14 12:43 ` Julien Grall
2014-10-14 12:57 ` Ian Campbell
2014-10-14 13:06 ` Julien Grall
2014-10-14 13:13 ` Jan Beulich
2014-10-14 13:18 ` Ian Campbell
2014-10-14 19:09 ` Tim Deegan
2014-10-15 7:31 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2014-10-14 15:52 Julien Grall
2014-10-14 16:29 ` Jan Beulich
2014-10-14 16:31 ` Julien Grall
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=543C0642.2020002@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.