Re: [PATCH] powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

2016-03-19 Thread Cyril Bur
On Wed, 16 Mar 2016 22:45:20 +1100 Benjamin Herrenschmidt wrote: > On Wed, 2016-03-16 at 13:29 +1100, Cyril Bur wrote: > > +#ifdef CONFIG_PPC_BOOK3S > > +   ld  r10,PACAKMSR(r13) > > +   li  r9,MSR_RI > > +   andcr11,r10,r9 /* Re-clear RI */ > > +   

Re: [PATCH] powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

2016-03-19 Thread Michael Ellerman
On Wed, 2016-03-16 at 22:45 +1100, Benjamin Herrenschmidt wrote: > On Wed, 2016-03-16 at 13:29 +1100, Cyril Bur wrote: > > +#ifdef CONFIG_PPC_BOOK3S > > + ld r10,PACAKMSR(r13) > > + li r9,MSR_RI > > + andcr11,r10,r9 /* Re-clear RI */ > > + mtmsrd r11,1 > >

Re: [PATCH] powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

2016-03-19 Thread Benjamin Herrenschmidt
On Wed, 2016-03-16 at 13:29 +1100, Cyril Bur wrote: > +#ifdef CONFIG_PPC_BOOK3S > +   ld  r10,PACAKMSR(r13) > +   li  r9,MSR_RI > +   andcr11,r10,r9 /* Re-clear RI */ > +   mtmsrd  r11,1 > +#endif Do you need that ? IE, mtmsrd with "1" will only update RI and EE, is

Re: powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

2016-03-16 Thread Michael Ellerman
On Wed, 2016-16-03 at 02:29:30 UTC, Cyril Bur wrote: > Commit 70fe3d9 "powerpc: Restore FPU/VEC/VSX if previously used" introduces a > call to restore_math() late in the syscall return path, after MSR_RI has been > cleared. The MSR_RI flag is used to indicate whether the kernel can take > another

[PATCH] powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

2016-03-15 Thread Cyril Bur
Commit 70fe3d9 "powerpc: Restore FPU/VEC/VSX if previously used" introduces a call to restore_math() late in the syscall return path, after MSR_RI has been cleared. The MSR_RI flag is used to indicate whether the kernel can take another exception or not. A cleared MSR_RI flag indicates that the