[.])
* Subtract From Carrying (subfc[.])
* Add Extended (adde[.])
* Subtract From Extended (subfe[.])
* Add to Minus One Extended (addme[.])
* Subtract From Minus One Extended (subfme[.])
* Add to Zero Extended (addze[.])
* Subtract From Zero Extended (subfze[.])
Signed-off-by: Sandipan Das
accordingly.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
arch/powerpc/lib/sstep.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 5e8418c28bd8..16814bfc01da 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/power
. The following instructions are affected:
* Shift Right Algebraic Word Immediate (srawi[.])
* Shift Right Algebraic Word (sraw[.])
* Shift Right Algebraic Doubleword Immediate (sradi[.])
* Shift Right Algebraic Doubleword (srad[.])
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.
Take advantage of stack_depth tracking, originally introduced for
x64, in powerpc JIT as well. Round up allocated stack by 16 bytes
to make sure it stays aligned for functions called from JITed bpf
program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
arch/powerpc/net/bpf
[.])
* Count Leading Zeros Doubleword (cntlzd[.])
This fixes the emulated behaviour of these instructions by adding an
additional check for this special case.
Fixes: 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify
*regs")
Signed-off-by: Sandipan Das <sandi...@linux
[.])
* Count Leading Zeros Doubleword (cntlzd[.])
This fixes the emulated behaviour of these instructions by adding an
additional check for this special case.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
arch/powerpc/lib/sstep.c | 12 ++--
1 file changed, 10 insertions
Syncing the bpf.h uapi header with tools so that struct
bpf_prog_info has the new fields for storing the kernel
symbol addresses for the JITed functions in a program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
tools/include/uapi/linux/bpf.h | 2 ++
1 file changed, 2 inse
of the instruction to determine
the callee's address. Instead, we use the alternative method of
getting it from the list of function addresses in the auxillary
data of the caller by using the off field as an index.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3: Mention briefly abo
for this list to lookup a callee's symbol's
address and resolve its name.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
tools/bpf/bpftool/prog.c | 33 +
tools/bpf/bpftool/xlated_d
instructions and using it to index into the list mentioned
above and lookup the callee's address.
To make sure that the existing JIT compilers continue to work
without requiring changes, we keep the imm field as it is.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3: Rephrase
of a callee's corresponding
symbol by using the imm field as an index for the
list of function addresses now available from the
program info.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
include/uapi/linu
Hi Jakub,
On 05/18/2018 12:21 AM, Jakub Kicinski wrote:
> On Thu, 17 May 2018 12:05:47 +0530, Sandipan Das wrote:
>> Currently, we resolve the callee's address for a JITed function
>> call by using the imm field of the call instruction as an offset
>> from __bpf_call_base
instructions and using it to index into the list mentioned
above and lookup the callee's address.
To make sure that the existing JIT compilers continue to work
without requiring changes, we keep the imm field as it is.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kern
from
the bpf system call.
Sandipan Das (6):
bpf: support 64-bit offsets for bpf function calls
bpf: powerpc64: add JIT support for multi-function programs
bpf: get kernel symbol addresses via syscall
tools: bpf: sync bpf uapi header
tools: bpftool: resolve calls without using imm
0: nop
4: nop
8: mflrr0
c: std r0,16(r1)
10: stdur1,-112(r1)
14: std r31,104(r1)
18: addir31,r1,48
1c: li r3,10
...
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kernel/bpf/syscall.
Syncing the bpf.h uapi header with tools so that struct
bpf_prog_info has the two new fields for passing on the
addresses of the kernel symbols corresponding to each
function in a JITed program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
tools/include/uapi/linux/bpf
for this list to lookup a callee's symbol's
address and resolve its name.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
tools/bpf/bpftool/prog.c | 31 +++
tools/bpf/bpftool/xlated_d
of a callee's corresponding
symbol by using the imm field as an index for the
list of kernel symbol addresses now available from
the program info.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
include/uapi
of the instruction to determine
the callee's address. Instead, we use the alternative method of
getting it from the list of function addresses in the auxillary
data of the caller by using the off field as an index.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
arch/powerpc/net/bpf_jit_co
Hi Daniel,
On 05/18/2018 09:21 PM, Daniel Borkmann wrote:
> On 05/18/2018 02:50 PM, Sandipan Das wrote:
>> Currently, for multi-function programs, we cannot get the JITed
>> instructions using the bpf system call's BPF_OBJ_GET_INFO_BY_FD
>> command. Because of
On 05/23/2018 02:38 PM, Daniel Borkmann wrote:
> On 05/22/2018 09:55 PM, Jakub Kicinski wrote:
>> On Tue, 22 May 2018 22:46:13 +0530, Sandipan Das wrote:
>>> + if (info.nr_jited_func_lens && info.jited_func_lens) {
>>> +
On 05/23/2018 07:20 PM, Daniel Borkmann wrote:
> On 05/23/2018 12:37 PM, Sandipan Das wrote:
> [...]
>> Other than that, for powerpc64, there is a problem with the way the
>> binutils disassembler code (in "opcodes/ppc-dis.c") passes arguments
>
instructions and using it to index into the list mentioned
above and lookup the callee's address.
To make sure that the existing JIT compilers continue to work
without requiring changes, we keep the imm field as it is.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kern
of the instruction to determine
the callee's address. Instead, we use the alternative method of
getting it from the list of function addresses in the auxiliary
data of the caller by using the off field as an index.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3:
- Fix memory leak for ji
applications like bpftool
to split up the contiguous JITed dump, also obtained via
the system call, into more relatable chunks corresponding
to each function.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
include/uapi/linux/bpf.h | 2 ++
kernel/bpf/syscall.c
required to load this
address may vary from what was previously generated. This can
make the JITed image grow or shrink.
To avoid this, we should generate a constant five-instruction
when loading function addresses by padding the optimized load
sequence with NOPs.
Signed-off-by: Sandipan Das <sa
Syncing the bpf.h uapi header with tools so that struct
bpf_prog_info has the two new fields for passing on the
JITed image lengths of each function in a multi-function
program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
tools/include/uapi/linux/bpf.h | 2 ++
1 file chan
after
the last pass due to the way the instruction sequence used
to load a callee's address maybe optimized.
- Make additional changes to the bpf system call and bpftool to
make multi-function JITed dumps easier to correlate.
v2:
- Incorporate review comments from Jakub.
Sandipan Das
Syncing the bpf.h uapi header with tools so that struct
bpf_prog_info has the two new fields for passing on the
addresses of the kernel symbols corresponding to each
function in a program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3:
- Move new fields to t
0: nop
4: nop
8: mflrr0
c: std r0,16(r1)
10: stdur1,-112(r1)
14: std r31,104(r1)
18: addir31,r1,48
1c: li r3,10
...
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v4:
- If the image allocated in use
for this list to lookup a callee's symbol's
address and resolve its name.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
v3:
- Avoid using redundant pointers.
- Fi
t;: ["%rbp"
]
},{
...
},{
"pc": "0x71",
"operation": "retq",
"operands": [null
]
}
]
},{
"name&
of a callee's corresponding
symbol by using the imm field as an index for the
list of kernel symbol addresses now available from
the program info.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3:
- Co
On 05/24/2018 01:04 PM, Daniel Borkmann wrote:
> On 05/24/2018 08:56 AM, Sandipan Das wrote:
>> For multi-function programs, loading the address of a callee
>> function to a register requires emitting instructions whose
>> count varies from one to five depending on the nat
for this list to lookup a callee's symbol's
address and resolve its name.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v2:
- Order variables from longest to shortest
- Make sure that ksyms_ptr and ksyms_len are always
On 05/18/2018 08:45 PM, Daniel Borkmann wrote:
> On 05/18/2018 02:50 PM, Sandipan Das wrote:
>> The imm field of a bpf instruction is a signed 32-bit integer.
>> For JIT bpf-to-bpf function calls, it stores the offset of the
>> start address of the callee's JITed image
of a callee's corresponding
symbol by using the imm field as an index for the
list of kernel symbol addresses now available from
the program info.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
include/uapi
instructions and using it to index into the list mentioned
above and lookup the callee's address.
To make sure that the existing JIT compilers continue to work
without requiring changes, we keep the imm field as it is.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kern
from
the bpf system call.
v2:
- Incorporate review comments from Jakub
Sandipan Das (6):
bpf: support 64-bit offsets for bpf function calls
bpf: powerpc64: add JIT support for multi-function programs
bpf: get kernel symbol addresses via syscall
tools: bpf: sync bpf uapi header
tools
Syncing the bpf.h uapi header with tools so that struct
bpf_prog_info has the two new fields for passing on the
addresses of the kernel symbols corresponding to each
function in a JITed program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
tools/include/uapi/linux/bpf
of the instruction to determine
the callee's address. Instead, we use the alternative method of
getting it from the list of function addresses in the auxillary
data of the caller by using the off field as an index.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
arch/powerpc/net/bpf_jit_co
0: nop
4: nop
8: mflrr0
c: std r0,16(r1)
10: stdur1,-112(r1)
14: std r31,104(r1)
18: addir31,r1,48
1c: li r3,10
...
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kernel/bpf/syscall.
instructions and using it to index into the list mentioned
above and lookup the callee's address.
To make sure that the existing JIT compilers continue to work
without requiring changes, we keep the imm field as it is.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kern
Syncing the bpf.h uapi header with tools so that struct
bpf_prog_info has the two new fields for passing on the
addresses of the kernel symbols corresponding to each
function in a program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3:
- Move new fields to t
of a callee's corresponding
symbol by using the imm field as an index for the
list of kernel symbol addresses now available from
the program info.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3:
- Co
Syncing the bpf.h uapi header with tools so that struct
bpf_prog_info has the two new fields for passing on the
JITed image lengths of each function in a multi-function
program.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
tools/include/uapi/linux/bpf.h | 2 ++
1 file chan
changes to the bpf system call and bpftool to
make multi-function JITed dumps easier to correlate.
v2:
- Incorporate review comments from Jakub.
Sandipan Das (10):
bpf: support 64-bit offsets for bpf function calls
bpf: powerpc64: pad function address loads with NOPs
bpf: powerpc64: add JIT
required to load this
address may vary from what was previously generated. This can
make the JITed image grow or shrink.
To avoid this, we should generate a constant five-instruction
when loading function addresses by padding the optimized load
sequence with NOPs.
Signed-off-by: Sandipan Das <sa
of the instruction to determine
the callee's address. Instead, we use the alternative method of
getting it from the list of function addresses in the auxiliary
data of the caller by using the off field as an index.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3:
- Fix memory leak for ji
for this list to lookup a callee's symbol's
address and resolve its name.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v3:
- Avoid using redundant pointers.
- Fix indentation.
v2:
- Order variables from longest to shortest.
0: nop
4: nop
8: mflrr0
c: std r0,16(r1)
10: stdur1,-112(r1)
14: std r31,104(r1)
18: addir31,r1,48
1c: li r3,10
...
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kernel/bpf/syscall.
applications like bpftool
to split up the contiguous JITed dump, also obtained via
the system call, into more relatable chunks corresponding
to each function.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
include/uapi/linux/bpf.h | 2 ++
kernel/bpf/syscall.c
a8: mr r3,r8
ac: blr
bpf_prog_196af774a3477707_F:
0: nop
4: nop
8: mflrr0
c: std r0,16(r1)
10: stdur1,-112(r1)
14: std r31,104(r1)
...
88: mr r3,r8
8c: blr
Signed-off-by: Sandipan Das
nsn
as a way to index into aux->func and also set aux->func_cnt
so that this can be used for performing basic upper bound
checks for the off field.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v2: Make aux->func point to the list of functions determined
by the ve
is performed.
Since it is seen that the offsets may be as large as 64 bits for
powerpc64, we use the aux data associated with each caller to get
the correct branch target address rather than using the imm field
of the BPF_CALL instruction.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
v
On 02/10/2018 06:08 AM, Alexei Starovoitov wrote:
> On 2/9/18 8:54 AM, Naveen N. Rao wrote:
>> Naveen N. Rao wrote:
>>> Alexei Starovoitov wrote:
>>>> On 2/8/18 4:03 AM, Sandipan Das wrote:
>>>>> The imm field of a bpf_insn is a signed 32-bit intege
is performed.
Since it is seen that the offsets may be as large as 64 bits for
powerpc64, we use the aux data associated with each caller to get
the correct branch target address rather than using the imm field
of the BPF_CALL instruction.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
this
cannot be accomodated in the imm field without truncation.
To resolve this, we additionally use the aux data within each
bpf_prog associated with the caller functions to store the
addresses of their respective callees.
Signed-off-by: Sandipan Das <sandi...@linux.vnet.ibm.com>
---
kern
Hi Segher,
On Wednesday 05 September 2018 02:51 AM, Segher Boessenkool wrote:
> On Mon, Sep 03, 2018 at 08:49:38PM +0530, Sandipan Das wrote:
>> +#ifdef __powerpc64__
>> +case 265: /* modud */
>> +if (!cpu_has_fea
Hi Segher,
On Wednesday 05 September 2018 03:42 AM, Segher Boessenkool wrote:
> On Mon, Sep 03, 2018 at 08:49:33PM +0530, Sandipan Das wrote:
>> +#ifdef __powerpc64__
>> +case 4:
>> +if (!cpu_has_feature(CPU_FTR_ARCH_300))
>> +
) r0 = 2
4: (95) exit
With this patch, it will look like this:
0: (85) call pc+2#bpf_prog_8f85936f29a7790a+3
1: (b7) r0 = 1
2: (95) exit
3: (b7) r0 = 2
4: (95) exit
where 8f85936f29a7790a is the tag of the bpf program and 3 is
the offset to the start of the subprog from t
On 15/11/18 8:04 AM, Nicholas Piggin wrote:
> Commit 4c2de74cc869 ("powerpc/64: Interrupts save PPR on stack rather
> than thread_struct") changed sizeof(struct pt_regs) % 16 from 0 to 8,
> which causes the interrupt frame allocation on kernel entry to put the
> kernel stack out of alignment.
>
>
From: PrasannaKumar Muralidharan
This adds emulation support for the following integer instructions:
* Modulo Signed Word (modsw)
* Modulo Unsigned Word (moduw)
Signed-off-by: PrasannaKumar Muralidharan
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 14 ++
1 file
This series adds emulation support for some additional ISA 3.0
instructions, most of which are now generated by a recent compiler
(e.g. gcc-8.x) when building the kernel with CONFIG_POWER9_CPU = y.
PrasannaKumar Muralidharan (1):
powerpc sstep: Add modsw, moduw instruction emulation
Sandipan
This adds emulation support for the following integer instructions:
* Count Trailing Zeros Word (cnttzw[.])
* Count Trailing Zeros Doubleword (cnttzd[.])
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/powerpc
This adds emulation support for the following integer instructions:
* Deliver A Random Number (darn)
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index
This adds emulation support for the following integer instructions:
* Modulo Signed Doubleword (modsd)
* Modulo Unsigned Doubleword (modud)
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch
This adds emulation support for the following integer instructions:
* Multiply-Add High Doubleword (maddhd)
* Multiply-Add High Doubleword Unsigned (maddhdu)
* Multiply-Add Low Doubleword (maddld)
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 35
This adds emulation support for the following integer instructions:
* Extend-Sign Word and Shift Left Immediate (extswsli[.])
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc
as everything else would still
remain exactly the same. This also reduces the number of writes
to the JITed image.
[3] Do not regenerate the prologue and the epilogue during the extra
pass as that would be redundant.
Signed-off-by: Sandipan Das
---
arch/powerpc/net/bpf_jit_comp64.c
Hi Daniel,
On 03/12/18 6:18 PM, Daniel Borkmann wrote:
>
> Thanks for the patch, just to clarify, it's targeted at bpf-next and
> not bpf, correct?
>
This patch is targeted at the bpf tree.
This depends on commit e2c95a61656d ("bpf, ppc64: generalize fetching
subprog into
in case of an architecture like powerpc64 which uses 64K
as the default page size (i.e. CONFIG_PPC_64K_PAGES is set).
So, instead of depending on the page size, use a constant value.
Fixes: ede95a63b5e8 ("bpf: add bpf_jit_limit knob to restrict unpriv
allocations")
Signed-off-by: Sa
ernel definitions of struct pt_regs")
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/perf_event.h | 2 ++
arch/powerpc/include/uapi/asm/Kbuild | 1 -
arch/powerpc/include/uapi/asm/bpf_perf_event.h | 9 +
3 files changed, 11 insertions(+), 1 deletion(-)
create m
Hi Michael,
On 21/02/19 4:43 PM, Michael Ellerman wrote:
> Sandipan Das writes:
>> This enhances the current selftest framework for validating
>> the in-kernel instruction emulation infrastructure by adding
>> support for compute type instructions i.e. integer ALU-
From: PrasannaKumar Muralidharan
This adds emulation support for the following integer instructions:
* Modulo Signed Word (modsw)
* Modulo Unsigned Word (moduw)
Signed-off-by: PrasannaKumar Muralidharan
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 14 ++
1 file
This adds emulation support for the following integer instructions:
* Modulo Signed Doubleword (modsd)
* Modulo Unsigned Doubleword (modud)
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch
This adds emulation support for the following integer instructions:
* Extend-Sign Word and Shift Left Immediate (extswsli[.])
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc
inline assembly to retain compatibility
with older binutils.
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/ppc-opcode.h | 15 +++-
arch/powerpc/lib/sstep.c | 35 ++-
2 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/arch
This adds emulation support for the following integer instructions:
* Count Trailing Zeros Word (cnttzw[.])
* Count Trailing Zeros Doubleword (cnttzd[.])
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/powerpc
This adds emulation support for the following integer instructions:
* Deliver A Random Number (darn)
As suggested by Michael, this uses a raw .long for specifying the
instruction word when using inline assembly to retain compatibility
with older binutils.
Signed-off-by: Sandipan Das
---
arch
arn instructions via inline assembly because older binutils
may not be able to recognize them (as pointed out by Michael).
PrasannaKumar Muralidharan (1):
powerpc sstep: Add support for modsw, moduw instructions
Sandipan Das (5):
powerpc: sstep: Add support for maddhd, maddhdu, mad
This adds test cases for the add[.] instruction.
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/test_emulate_step.c | 176 +++
1 file changed, 176 insertions(+)
diff --git a/arch/powerpc/lib/test_emulate_step.c
b/arch/powerpc/lib/test_emulate_step.c
index
of the GPRs can be validated, support for SPRs is
limited to LR, CR and XER for now.
When writing the test cases, one must ensure that the Stack
Pointer (GPR1) or the Thread Pointer (GPR13) are not touched
by any means as these are vital non-volatile registers.
Signed-off-by: Sandipan Das
---
arch
This adds test cases for the addc[.] instruction.
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/lib/test_emulate_step.c | 192 ++
2 files changed, 193 insertions(+)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h
b/arch
ing the macros in the current infrastructure.
- Add a message to indicate that the tests are being run based on
suggestions from Daniel.
Sandipan Das (3):
powerpc: sstep: Add tests for compute type instructions
powerpc: sstep: Add tests for add[.] instruction
powerpc: sstep: Add te
Hi Michael,
On 20/02/19 6:20 AM, Michael Ellerman wrote:
> Sandipan Das writes:
>
>> This adds emulation support for the following integer instructions:
>> * Deliver A Random Number (darn)
>
> This doesn't build with old binutils. We need to support old binutils.
On 11/02/19 6:30 AM, Daniel Axtens wrote:
> Hi Sandipan,
>
>> +{
>> +.descr = "RA = LONG_MIN | INT_MIN, RB =
>> LONG_MIN | INT_MIN",
>> +.instr = PPC_INST_ADDC | ___PPC_RT(20) |
>> ___PPC_RA(21) | ___PPC_RB(22),
>> +
On 11/02/19 6:17 AM, Daniel Axtens wrote:
> Hi Sandipan,
>
> I'm not really confident to review the asm, but I did have a couple of
> questions about the C:
>
>> +#define MAX_INSNS 32
> This doesn't seem to be used...
>
True. Thanks for pointing this out.
>> +int execute_instr(struct
demonstrate this for different scenarios
where the CA and CA32 bits of XER should be set.
Sandipan Das (5):
powerpc: Add bitmasks for D-form instruction fields
powerpc: Add bitmask for Rc instruction field
powerpc: sstep: Add instruction emulation selftests
powerpc: sstep: Add selftests
This adds the bitmask definition for the Record bit that
is available at the end (bit 31) of some instructions.
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h
b/arch/powerpc/include
if CONFIG_DEBUG_KERNEL, CONFIG_PPC64
and CONFIG_EMULATE_STEP_SELFTEST were set before the kernel
build.
When writing the tests, one must not use any instructions
that might overwrite the Stack Pointer (GPR1) or the Thread
Pointer (GPR13).
Signed-off-by: Sandipan Das
---
arch/powerpc/Kconfig.debug
This adds the bitmask definitions of D, SI and UI fields
found in D-form instructions.
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/ppc-opcode.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h
b/arch/powerpc/include/asm/ppc-opcode.h
This adds test cases for the add[.] instruction.
Signed-off-by: Sandipan Das
---
arch/powerpc/lib/sstep_tests.c | 194 +
1 file changed, 194 insertions(+)
diff --git a/arch/powerpc/lib/sstep_tests.c b/arch/powerpc/lib/sstep_tests.c
index a610c778044d
This adds test cases for the addc[.] instruction.
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/lib/sstep_tests.c| 212 ++
2 files changed, 213 insertions(+)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h
b/arch
/bpf_jit_comp64.c | 8
> .../testing/selftests/bpf/verifier/div_overflow.c | 14 ++
> 4 files changed, 16 insertions(+), 9 deletions(-)
>
For the series
Acked-by: Sandipan Das
ted to v4.14]
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/cputable.h| 4 ++-
arch/powerpc/kernel/dt_cpu_ftrs.c | 3 ++
arch/powerpc/kvm/book3s_64_mmu_radix.c | 3 ++
arch/powerpc/kvm/book3s_hv_rm_mmu.c| 11 +++
arch/powerpc/mm/hash_native_64.c | 16 +++
store queue marking flush.
Cc: sta...@vger.kernel.org # v4.14
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Michael Ellerman
Link:
https://lore.kernel.org/r/20190924035254.24612-3-aneesh.ku...@linux.ibm.com
[sandipan: Backported to v4.14]
Signed-off-by: Sandipan Das
---
arch/powerpc/include
to v4.14]
Signed-off-by: Sandipan Das
---
arch/powerpc/include/asm/cputable.h| 4 ++--
arch/powerpc/kernel/dt_cpu_ftrs.c | 6 +++---
arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +-
arch/powerpc/kvm/book3s_hv_rm_mmu.c| 2 +-
arch/powerpc/mm/hash_native_64.c | 2 +-
arch/po
-aneesh.ku...@linux.ibm.com
[sandipan: Backported to v4.14]
Signed-off-by: Sandipan Das
---
tools/testing/selftests/powerpc/mm/Makefile | 2 +
.../testing/selftests/powerpc/mm/tlbie_test.c | 734 ++
2 files changed, 736 insertions(+)
create mode 100644 tools/testing/selftests/
r.kernel.org # v4.14
Fixes: a5d4b5891c2f ("powerpc/mm: Fixup tlbie vs store ordering issue on
POWER9")
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Michael Ellerman
Link:
https://lore.kernel.org/r/20190924035254.24612-1-aneesh.ku...@linux.ibm.com
[sandipan: Backported to v4.1
1 - 100 of 321 matches
Mail list logo