]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Split out instruction analysis part of emulate_step()
authorPaul Mackerras <paulus@samba.org>
Tue, 2 Sep 2014 04:35:07 +0000 (14:35 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Sep 2014 13:14:51 +0000 (23:14 +1000)
commit0b6bba2812d16f146031a7fb5bea2eb963fe2cbe
treeef054973ec062a761afcf10aa688e67ad047d7ff
parentf8b5e7ee0facbf16aa626095b6fb3153dd234079
powerpc: Split out instruction analysis part of emulate_step()

This splits out the instruction analysis part of emulate_step() into
a separate analyse_instr() function, which decodes the instruction,
but doesn't execute any load or store instructions.  It does execute
integer instructions and branches which can be executed purely by
updating register values in the pt_regs struct.  For other instructions,
it returns the instruction type and other details in a new
instruction_op struct.  emulate_step() then uses that information
to execute loads, stores, cache operations, mfmsr, mtmsr[d], and
(on 64-bit) sc instructions.

The reason for doing this is so that the KVM code can use it instead
of having its own separate instruction emulation code.  Possibly the
alignment interrupt handler could also use this.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/sstep.h
arch/powerpc/lib/sstep.c