[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 for 4.5] arm32: fix build after 063188f4b3
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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |