1. 30 10月, 2013 2 次提交
  2. 29 10月, 2013 26 次提交
  3. 23 10月, 2013 1 次提交
    • P
      powerpc: Don't corrupt user registers on 32-bit · 955c1cab
      Paul Mackerras 提交于
      Commit de79f7b9 ("powerpc: Put FP/VSX and VR state into structures")
      modified load_up_fpu() and load_up_altivec() in such a way that they
      now use r7 and r8.  Unfortunately, the callers of these functions on
      32-bit machines then return to userspace via fast_exception_return,
      which doesn't restore all of the volatile GPRs, but only r1, r3 -- r6
      and r9 -- r12.  This was causing userspace segfaults and other
      userspace misbehaviour on 32-bit machines.
      
      This fixes the problem by changing the register usage of load_up_fpu()
      and load_up_altivec() to avoid using r7 and r8 and instead use r6 and
      r10.  This also adds comments to those functions saying which registers
      may be used.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Tested-by: Scott Wood <scottwood@freescale.com> (on e500mc, so no altivec)
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      955c1cab
  4. 19 10月, 2013 5 次提交
  5. 17 10月, 2013 4 次提交
  6. 11 10月, 2013 2 次提交
    • B
      Merge branch 'for-kvm' into next · 3ad26e5c
      Benjamin Herrenschmidt 提交于
      Topic branch for commits that the KVM tree might want to pull
      in separately.
      
      Hand merged a few files due to conflicts with the LE stuff
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3ad26e5c
    • P
      powerpc: Provide for giveup_fpu/altivec to save state in alternate location · 18461960
      Paul Mackerras 提交于
      This provides a facility which is intended for use by KVM, where the
      contents of the FP/VSX and VMX (Altivec) registers can be saved away
      to somewhere other than the thread_struct when kernel code wants to
      use floating point or VMX instructions.  This is done by providing a
      pointer in the thread_struct to indicate where the state should be
      saved to.  The giveup_fpu() and giveup_altivec() functions test these
      pointers and save state to the indicated location if they are non-NULL.
      Note that the MSR_FP/VEC bits in task->thread.regs->msr are still used
      to indicate whether the CPU register state is live, even when an
      alternate save location is being used.
      
      This also provides load_fp_state() and load_vr_state() functions, which
      load up FP/VSX and VMX state from memory into the CPU registers, and
      corresponding store_fp_state() and store_vr_state() functions, which
      store FP/VSX and VMX state into memory from the CPU registers.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      18461960