diff options
author | Alexander Graf <agraf@suse.de> | 2011-08-08 10:11:36 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-09-25 12:52:22 -0400 |
commit | 77e675ad825d1106f973afd353e8af84cd8d3960 (patch) | |
tree | 38aafd0e46d019c32149587f10fcd02e88f93a4c /arch/powerpc/kvm/book3s_segment.S | |
parent | 04fcc11bb5653c421f11f109d8b79ea5eb9fedb4 (diff) |
KVM: PPC: Read out syscall instruction on trap
We have a few traps where we cache the instruction that cause the trap
for analysis later on. Since we now need to be able to distinguish
between SC 0 and SC 1 system calls and the only way to find out which
is which is by looking at the instruction, we also read out the instruction
causing the system call.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_segment.S')
-rw-r--r-- | arch/powerpc/kvm/book3s_segment.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_segment.S b/arch/powerpc/kvm/book3s_segment.S index aed32e517212..678b6be31693 100644 --- a/arch/powerpc/kvm/book3s_segment.S +++ b/arch/powerpc/kvm/book3s_segment.S | |||
@@ -213,11 +213,16 @@ END_FTR_SECTION_IFSET(CPU_FTR_HVMODE) | |||
213 | beq ld_last_inst | 213 | beq ld_last_inst |
214 | cmpwi r12, BOOK3S_INTERRUPT_PROGRAM | 214 | cmpwi r12, BOOK3S_INTERRUPT_PROGRAM |
215 | beq ld_last_inst | 215 | beq ld_last_inst |
216 | cmpwi r12, BOOK3S_INTERRUPT_SYSCALL | ||
217 | beq ld_last_prev_inst | ||
216 | cmpwi r12, BOOK3S_INTERRUPT_ALIGNMENT | 218 | cmpwi r12, BOOK3S_INTERRUPT_ALIGNMENT |
217 | beq- ld_last_inst | 219 | beq- ld_last_inst |
218 | 220 | ||
219 | b no_ld_last_inst | 221 | b no_ld_last_inst |
220 | 222 | ||
223 | ld_last_prev_inst: | ||
224 | addi r3, r3, -4 | ||
225 | |||
221 | ld_last_inst: | 226 | ld_last_inst: |
222 | /* Save off the guest instruction we're at */ | 227 | /* Save off the guest instruction we're at */ |
223 | 228 | ||