summaryrefslogtreecommitdiff
path: root/arch/s390/kvm/trace.h
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.vnet.ibm.com>2016-05-09 15:14:01 +0300
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-06-10 13:07:11 +0300
commita011eeb2a3d6cd778eb63bea0bf149ebbe658ab5 (patch)
tree9e0ef8496b793e205fb96efbdacab329f1ad9bcc /arch/s390/kvm/trace.h
parent022bd2d11cc51f62e873a09bcae8016b10950194 (diff)
downloadlinux-a011eeb2a3d6cd778eb63bea0bf149ebbe658ab5.tar.xz
KVM: s390: Add operation exception interception handler
This commit introduces code that handles operation exception interceptions. With this handler we can emulate instructions by using illegal opcodes. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/trace.h')
-rw-r--r--arch/s390/kvm/trace.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/s390/kvm/trace.h b/arch/s390/kvm/trace.h
index 916834d7a73a..90d26a6aa52c 100644
--- a/arch/s390/kvm/trace.h
+++ b/arch/s390/kvm/trace.h
@@ -412,6 +412,27 @@ TRACE_EVENT(kvm_s390_handle_stsi,
__entry->addr)
);
+TRACE_EVENT(kvm_s390_handle_operexc,
+ TP_PROTO(VCPU_PROTO_COMMON, __u16 ipa, __u32 ipb),
+ TP_ARGS(VCPU_ARGS_COMMON, ipa, ipb),
+
+ TP_STRUCT__entry(
+ VCPU_FIELD_COMMON
+ __field(__u64, instruction)
+ ),
+
+ TP_fast_assign(
+ VCPU_ASSIGN_COMMON
+ __entry->instruction = ((__u64)ipa << 48) |
+ ((__u64)ipb << 16);
+ ),
+
+ VCPU_TP_PRINTK("operation exception on instruction %016llx (%s)",
+ __entry->instruction,
+ __print_symbolic(icpt_insn_decoder(__entry->instruction),
+ icpt_insn_codes))
+ );
+
#endif /* _TRACE_KVM_H */
/* This part must be outside protection */