File tree Expand file tree Collapse file tree 4 files changed +34
-0
lines changed Expand file tree Collapse file tree 4 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,7 @@ struct kvm_vcpu_stat {
255
255
u32 instruction_stctg ;
256
256
u32 exit_program_interruption ;
257
257
u32 exit_instr_and_program ;
258
+ u32 exit_operation_exception ;
258
259
u32 deliver_external_call ;
259
260
u32 deliver_emergency_signal ;
260
261
u32 deliver_service_signal ;
Original file line number Diff line number Diff line change @@ -349,6 +349,15 @@ static int handle_partial_execution(struct kvm_vcpu *vcpu)
349
349
return - EOPNOTSUPP ;
350
350
}
351
351
352
+ static int handle_operexc (struct kvm_vcpu * vcpu )
353
+ {
354
+ vcpu -> stat .exit_operation_exception ++ ;
355
+ trace_kvm_s390_handle_operexc (vcpu , vcpu -> arch .sie_block -> ipa ,
356
+ vcpu -> arch .sie_block -> ipb );
357
+
358
+ return kvm_s390_inject_program_int (vcpu , PGM_OPERATION );
359
+ }
360
+
352
361
int kvm_handle_sie_intercept (struct kvm_vcpu * vcpu )
353
362
{
354
363
if (kvm_is_ucontrol (vcpu -> kvm ))
@@ -370,6 +379,8 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)
370
379
return handle_validity (vcpu );
371
380
case 0x28 :
372
381
return handle_stop (vcpu );
382
+ case 0x2c :
383
+ return handle_operexc (vcpu );
373
384
case 0x38 :
374
385
return handle_partial_execution (vcpu );
375
386
default :
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
63
63
{ "exit_instruction" , VCPU_STAT (exit_instruction ) },
64
64
{ "exit_program_interruption" , VCPU_STAT (exit_program_interruption ) },
65
65
{ "exit_instr_and_program_int" , VCPU_STAT (exit_instr_and_program ) },
66
+ { "exit_operation_exception" , VCPU_STAT (exit_operation_exception ) },
66
67
{ "halt_successful_poll" , VCPU_STAT (halt_successful_poll ) },
67
68
{ "halt_attempted_poll" , VCPU_STAT (halt_attempted_poll ) },
68
69
{ "halt_poll_invalid" , VCPU_STAT (halt_poll_invalid ) },
Original file line number Diff line number Diff line change @@ -412,6 +412,27 @@ TRACE_EVENT(kvm_s390_handle_stsi,
412
412
__entry -> addr )
413
413
);
414
414
415
+ TRACE_EVENT (kvm_s390_handle_operexc ,
416
+ TP_PROTO (VCPU_PROTO_COMMON , __u16 ipa , __u32 ipb ),
417
+ TP_ARGS (VCPU_ARGS_COMMON , ipa , ipb ),
418
+
419
+ TP_STRUCT__entry (
420
+ VCPU_FIELD_COMMON
421
+ __field (__u64 , instruction )
422
+ ),
423
+
424
+ TP_fast_assign (
425
+ VCPU_ASSIGN_COMMON
426
+ __entry -> instruction = ((__u64 )ipa << 48 ) |
427
+ ((__u64 )ipb << 16 );
428
+ ),
429
+
430
+ VCPU_TP_PRINTK ("operation exception on instruction %016llx (%s)" ,
431
+ __entry -> instruction ,
432
+ __print_symbolic (icpt_insn_decoder (__entry -> instruction ),
433
+ icpt_insn_codes ))
434
+ );
435
+
415
436
#endif /* _TRACE_KVM_H */
416
437
417
438
/* This part must be outside protection */
You can’t perform that action at this time.
0 commit comments