diff options
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index d470ccbfabae..ecced9d18986 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -32,6 +32,10 @@ | |||
32 | #include "kvm-s390.h" | 32 | #include "kvm-s390.h" |
33 | #include "gaccess.h" | 33 | #include "gaccess.h" |
34 | 34 | ||
35 | #define CREATE_TRACE_POINTS | ||
36 | #include "trace.h" | ||
37 | #include "trace-s390.h" | ||
38 | |||
35 | #define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU | 39 | #define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU |
36 | 40 | ||
37 | struct kvm_stats_debugfs_item debugfs_entries[] = { | 41 | struct kvm_stats_debugfs_item debugfs_entries[] = { |
@@ -242,6 +246,7 @@ out_err: | |||
242 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) | 246 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) |
243 | { | 247 | { |
244 | VCPU_EVENT(vcpu, 3, "%s", "free cpu"); | 248 | VCPU_EVENT(vcpu, 3, "%s", "free cpu"); |
249 | trace_kvm_s390_destroy_vcpu(vcpu->vcpu_id); | ||
245 | if (!kvm_is_ucontrol(vcpu->kvm)) { | 250 | if (!kvm_is_ucontrol(vcpu->kvm)) { |
246 | clear_bit(63 - vcpu->vcpu_id, | 251 | clear_bit(63 - vcpu->vcpu_id, |
247 | (unsigned long *) &vcpu->kvm->arch.sca->mcn); | 252 | (unsigned long *) &vcpu->kvm->arch.sca->mcn); |
@@ -417,6 +422,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, | |||
417 | goto out_free_sie_block; | 422 | goto out_free_sie_block; |
418 | VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu, | 423 | VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu, |
419 | vcpu->arch.sie_block); | 424 | vcpu->arch.sie_block); |
425 | trace_kvm_s390_create_vcpu(id, vcpu, vcpu->arch.sie_block); | ||
420 | 426 | ||
421 | return vcpu; | 427 | return vcpu; |
422 | out_free_sie_block: | 428 | out_free_sie_block: |
@@ -607,18 +613,22 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
607 | local_irq_enable(); | 613 | local_irq_enable(); |
608 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", | 614 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", |
609 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 615 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
616 | trace_kvm_s390_sie_enter(vcpu, | ||
617 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | ||
610 | rc = sie64a(vcpu->arch.sie_block, vcpu->run->s.regs.gprs); | 618 | rc = sie64a(vcpu->arch.sie_block, vcpu->run->s.regs.gprs); |
611 | if (rc) { | 619 | if (rc) { |
612 | if (kvm_is_ucontrol(vcpu->kvm)) { | 620 | if (kvm_is_ucontrol(vcpu->kvm)) { |
613 | rc = SIE_INTERCEPT_UCONTROL; | 621 | rc = SIE_INTERCEPT_UCONTROL; |
614 | } else { | 622 | } else { |
615 | VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction"); | 623 | VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction"); |
624 | trace_kvm_s390_sie_fault(vcpu); | ||
616 | kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); | 625 | kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); |
617 | rc = 0; | 626 | rc = 0; |
618 | } | 627 | } |
619 | } | 628 | } |
620 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", | 629 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", |
621 | vcpu->arch.sie_block->icptcode); | 630 | vcpu->arch.sie_block->icptcode); |
631 | trace_kvm_s390_sie_exit(vcpu, vcpu->arch.sie_block->icptcode); | ||
622 | local_irq_disable(); | 632 | local_irq_disable(); |
623 | kvm_guest_exit(); | 633 | kvm_guest_exit(); |
624 | local_irq_enable(); | 634 | local_irq_enable(); |
@@ -959,7 +969,12 @@ void kvm_arch_commit_memory_region(struct kvm *kvm, | |||
959 | return; | 969 | return; |
960 | } | 970 | } |
961 | 971 | ||
962 | void kvm_arch_flush_shadow(struct kvm *kvm) | 972 | void kvm_arch_flush_shadow_all(struct kvm *kvm) |
973 | { | ||
974 | } | ||
975 | |||
976 | void kvm_arch_flush_shadow_memslot(struct kvm *kvm, | ||
977 | struct kvm_memory_slot *slot) | ||
963 | { | 978 | { |
964 | } | 979 | } |
965 | 980 | ||