Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1513754 > unrolled thread

[PATCH 0/3] powerpc: Emulation support for load/store instructions on LE

Started byRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
First post2016-11-02 10:00 +0100
Last post2016-11-03 08:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-11-02 10:00 +0100
    Re: [PATCH 0/3] powerpc: Emulation support for load/store  instructions on LE "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-11-03 08:10 +0100

#1513754 — [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE

FromRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Date2016-11-02 10:00 +0100
Subject[PATCH 0/3] powerpc: Emulation support for load/store instructions on LE
Message-ID<syZyN-40k-3@gated-at.bofh.it>
emulate_step is the basic infrastructure which is used by number of other
kernel infrastructures like kprobe, hw-breakpoint(data breakpoint) etc.
In case of kprobe, enabling emulation of load/store instructions will
speedup the execution of probed instruction. In case of kernel-space
breakpoint, causative instruction is first get emulated before executing
user registered handler. If emulation fails, hw-breakpoint is disabled
with error. As emulate_step does not support load/store instructions on
LE, kernel-space hw-breakpoint infrastructure is broken on LE.

emulate_step() uses a number of underlying kernel functions that were
initially not enabled for LE. This has been rectified since. So, fix
emulate_step() for LE for the corresponding instructions.

Also add selftest which will run at boot if CONFIG_KPROBES_SANITY_TEST
and CONFIG_PPC64 is set.

Changes w.r.t. RFC:
  - Enable emulation support for all types of (Normal, Floating Point,
    Vector and Vector Scalar) load/store instructions.
  - Introduce selftest to test emulate_step for load/store instructions.

Ravi Bangoria (3):
  powerpc: Emulation support for load/store instructions on LE
  powerpc: Add encoding for couple of load/store instructions
  powerpc: emulate_step test for load/store instructions

 arch/powerpc/include/asm/ppc-opcode.h |   7 +
 arch/powerpc/include/asm/sstep.h      |   8 +
 arch/powerpc/kernel/kprobes.c         |   2 +
 arch/powerpc/lib/Makefile             |   4 +
 arch/powerpc/lib/sstep.c              |  20 --
 arch/powerpc/lib/test_emulate_step.c  | 439 ++++++++++++++++++++++++++++++++++
 6 files changed, 460 insertions(+), 20 deletions(-)
 create mode 100644 arch/powerpc/lib/test_emulate_step.c

-- 
1.8.3.1

[toc] | [next] | [standalone]


#1514335 — Re: [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE

From"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Date2016-11-03 08:10 +0100
SubjectRe: [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE
Message-ID<szkjT-HP-9@gated-at.bofh.it>
In reply to#1513754
On 2016/11/02 02:23PM, Ravi Bangoria wrote:
> emulate_step is the basic infrastructure which is used by number of other
> kernel infrastructures like kprobe, hw-breakpoint(data breakpoint) etc.
> In case of kprobe, enabling emulation of load/store instructions will
> speedup the execution of probed instruction. In case of kernel-space
> breakpoint, causative instruction is first get emulated before executing
> user registered handler. If emulation fails, hw-breakpoint is disabled
> with error. As emulate_step does not support load/store instructions on
> LE, kernel-space hw-breakpoint infrastructure is broken on LE.
> 
> emulate_step() uses a number of underlying kernel functions that were
> initially not enabled for LE. This has been rectified since. So, fix
> emulate_step() for LE for the corresponding instructions.
> 
> Also add selftest which will run at boot if CONFIG_KPROBES_SANITY_TEST
> and CONFIG_PPC64 is set.
> 
> Changes w.r.t. RFC:
>   - Enable emulation support for all types of (Normal, Floating Point,
>     Vector and Vector Scalar) load/store instructions.
>   - Introduce selftest to test emulate_step for load/store instructions.
> 
> Ravi Bangoria (3):
>   powerpc: Emulation support for load/store instructions on LE
>   powerpc: Add encoding for couple of load/store instructions
>   powerpc: emulate_step test for load/store instructions

> 
>  arch/powerpc/include/asm/ppc-opcode.h |   7 +
>  arch/powerpc/include/asm/sstep.h      |   8 +
>  arch/powerpc/kernel/kprobes.c         |   2 +
>  arch/powerpc/lib/Makefile             |   4 +
>  arch/powerpc/lib/sstep.c              |  20 --
>  arch/powerpc/lib/test_emulate_step.c  | 439 ++++++++++++++++++++++++++++++++++
>  6 files changed, 460 insertions(+), 20 deletions(-)
>  create mode 100644 arch/powerpc/lib/test_emulate_step.c

Patch 2 can be folded into the third patch. Apart from that, and the 
minor nit with patch 3, for this series:
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Thanks,
Naveen

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web