Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-06 Thread Catalin Marinas
On Fri, Oct 06, 2017 at 04:15:28PM +0100, Dave P Martin wrote: > On Fri, Oct 06, 2017 at 02:36:40PM +0100, Catalin Marinas wrote: > > On Fri, Oct 06, 2017 at 02:10:09PM +0100, Dave P Martin wrote: > > > On Thu, Oct 05, 2017 at 12:28:35PM +0100, Catalin Marinas wrote: > > > > On Tue, Oct 03, 2017 at

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-06 Thread Dave Martin
On Fri, Oct 06, 2017 at 02:36:40PM +0100, Catalin Marinas wrote: > On Fri, Oct 06, 2017 at 02:10:09PM +0100, Dave P Martin wrote: > > On Thu, Oct 05, 2017 at 12:28:35PM +0100, Catalin Marinas wrote: > > > On Tue, Oct 03, 2017 at 12:33:03PM +0100, Dave P Martin wrote: > > > > TIF_FOREIGN_FPSTATE's m

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-06 Thread Catalin Marinas
On Fri, Oct 06, 2017 at 02:10:09PM +0100, Dave P Martin wrote: > On Thu, Oct 05, 2017 at 12:28:35PM +0100, Catalin Marinas wrote: > > On Tue, Oct 03, 2017 at 12:33:03PM +0100, Dave P Martin wrote: > > > TIF_FOREIGN_FPSTATE's meaning is expanded to cover SVE, but otherwise > > > unchanged: > > > >

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-06 Thread Dave Martin
On Thu, Oct 05, 2017 at 12:28:35PM +0100, Catalin Marinas wrote: > On Tue, Oct 03, 2017 at 12:33:03PM +0100, Dave P Martin wrote: > > On Wed, Sep 13, 2017 at 07:33:25AM -0700, Catalin Marinas wrote: > > > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > > > +/* > > > > + * Handle

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-05 Thread Catalin Marinas
On Tue, Oct 03, 2017 at 12:33:03PM +0100, Dave P Martin wrote: > On Wed, Sep 13, 2017 at 07:33:25AM -0700, Catalin Marinas wrote: > > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > > +/* > > > + * Handle SVE state across fork(): > > > + * > > > + * dst and src must not end up wi

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-04 Thread Catalin Marinas
On Tue, Oct 03, 2017 at 12:11:01PM +0100, Dave P Martin wrote: > On Wed, Sep 20, 2017 at 02:58:56PM +0100, Catalin Marinas wrote: > > On Thu, Sep 14, 2017 at 08:55:56PM +0100, Dave P Martin wrote: > > > On Wed, Sep 13, 2017 at 07:33:25AM -0700, Catalin Marinas wrote: > > > > On Thu, Aug 31, 2017 at

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-03 Thread Dave Martin
On Wed, Sep 13, 2017 at 07:33:25AM -0700, Catalin Marinas wrote: > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > +/* > > + * Handle SVE state across fork(): > > + * > > + * dst and src must not end up with aliases of the same sve_state. > > + * Because a task cannot fork except

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-10-03 Thread Dave Martin
On Wed, Sep 20, 2017 at 02:58:56PM +0100, Catalin Marinas wrote: > On Thu, Sep 14, 2017 at 08:55:56PM +0100, Dave P Martin wrote: > > On Wed, Sep 13, 2017 at 07:33:25AM -0700, Catalin Marinas wrote: > > > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > > > +/* > > > > + * Handle

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-20 Thread Catalin Marinas
On Thu, Sep 14, 2017 at 08:55:56PM +0100, Dave P Martin wrote: > On Wed, Sep 13, 2017 at 07:33:25AM -0700, Catalin Marinas wrote: > > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > > +/* > > > + * Handle SVE state across fork(): > > > + * > > > + * dst and src must not end up wi

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-19 Thread Catalin Marinas
On Thu, Sep 14, 2017 at 08:40:41PM +0100, Dave P Martin wrote: > On Wed, Sep 13, 2017 at 03:21:29PM -0700, Catalin Marinas wrote: > > On Wed, Sep 13, 2017 at 08:17:07PM +0100, Dave P Martin wrote: > > > On Wed, Sep 13, 2017 at 10:26:05AM -0700, Catalin Marinas wrote: > > > > On Thu, Aug 31, 2017 at

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-14 Thread Dave Martin
On Wed, Sep 13, 2017 at 07:33:25AM -0700, Catalin Marinas wrote: > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > +/* > > + * Handle SVE state across fork(): > > + * > > + * dst and src must not end up with aliases of the same sve_state. > > + * Because a task cannot fork except

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-14 Thread Dave Martin
On Wed, Sep 13, 2017 at 03:21:29PM -0700, Catalin Marinas wrote: > On Wed, Sep 13, 2017 at 08:17:07PM +0100, Dave P Martin wrote: > > On Wed, Sep 13, 2017 at 10:26:05AM -0700, Catalin Marinas wrote: > > > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > > > +/* > > > > + * Trapped

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-13 Thread Catalin Marinas
On Wed, Sep 13, 2017 at 08:17:07PM +0100, Dave P Martin wrote: > On Wed, Sep 13, 2017 at 10:26:05AM -0700, Catalin Marinas wrote: > > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > > +/* > > > + * Trapped SVE access > > > + */ > > > +void do_sve_acc(unsigned int esr, struct pt_r

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-13 Thread Dave Martin
On Wed, Sep 13, 2017 at 10:26:05AM -0700, Catalin Marinas wrote: > On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > > +el0_sve_acc: > > + /* > > +* Scalable Vector Extension access > > +*/ > > + enable_dbg > > + ct_user_exit > > + mov x0, x25 > > + mov x1,

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-13 Thread Catalin Marinas
On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > +el0_sve_acc: > + /* > + * Scalable Vector Extension access > + */ > + enable_dbg > + ct_user_exit > + mov x0, x25 > + mov x1, sp > + bl do_sve_acc > + b ret_to_user I think do

Re: [PATCH v2 11/28] arm64/sve: Core task context handling

2017-09-13 Thread Catalin Marinas
On Thu, Aug 31, 2017 at 06:00:43PM +0100, Dave P Martin wrote: > +/* > + * Handle SVE state across fork(): > + * > + * dst and src must not end up with aliases of the same sve_state. > + * Because a task cannot fork except in a syscall, we can discard SVE > + * state for dst here, so long as we tak

[PATCH v2 11/28] arm64/sve: Core task context handling

2017-08-31 Thread Dave Martin
This patch adds the core support for switching and managing the SVE architectural state of user tasks. Calls to the existing FPSIMD low-level save/restore functions are factored out as new functions task_fpsimd_{save,load}(), since SVE now dynamically may or may not need to be handled at these poi