Subject: Re: [PATCH 1/8] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

From: Michael Neuling <[email-masked]>
Date: Mon, 23 Nov 2015 12:06:20 +1100

On Mon, 2015-11-23 at 11:58 +1100, Cyril Bur wrote:
> On Mon, 23 Nov 2015 11:23:13 +1100
> Michael Neuling <[email-masked]> wrote:
>=20
> > On Wed, 2015-11-18 at 14:26 +1100, Cyril Bur wrote:
> > > Test that the non volatile floating point and Altivec registers
> > > get
> > > correctly preserved across the fork() syscall. =20
> >=20
> > Can we add a test for VSX too?  I realise it's the same registers,
> > but
> > the enable bits in the MSR are different so it's easy to get them
> > wrong
> > in the kernel.
>=20
> Yeah, I'm sure I could get that wrong haha.
>=20
> Hmmmm this got me thinking. Today we always enable FP and Altivec
> when we
> enable VSX but isn't there a world where we could actually run with
> FP and
> Altivec disabled and VSX on? In which case, is the whole thing
> volatile or
> does the kernel still need to save the subset of the matrix which
> corresponds=20
> to non-volatile FPs and non-volatile Altivec?

The hardware can run with FP and VMX off and VSX on but we should never
do that in Linux.

Mikey