diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-10-09 10:08:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 02:32:16 -0500 |
commit | ec1ff79084fccdae0dca9b04b89dcdf3235bbfa1 (patch) | |
tree | fddd8cfce75d88116c2fbcb1cf15e70a3588dfbc /arch/x86/kvm | |
parent | 236649de3360916ef85f95c82723af17a25b9179 (diff) |
KVM: SVM: Add tracepoint for invlpga instruction
This patch adds a tracepoint for the event that the guest
executed the INVLPGA instruction.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/svm.c | 3 | ||||
-rw-r--r-- | arch/x86/kvm/trace.h | 23 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 1 |
3 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 78a391c60a75..ba18fb7d3657 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1976,6 +1976,9 @@ static int invlpga_interception(struct vcpu_svm *svm) | |||
1976 | struct kvm_vcpu *vcpu = &svm->vcpu; | 1976 | struct kvm_vcpu *vcpu = &svm->vcpu; |
1977 | nsvm_printk("INVLPGA\n"); | 1977 | nsvm_printk("INVLPGA\n"); |
1978 | 1978 | ||
1979 | trace_kvm_invlpga(svm->vmcb->save.rip, vcpu->arch.regs[VCPU_REGS_RCX], | ||
1980 | vcpu->arch.regs[VCPU_REGS_RAX]); | ||
1981 | |||
1979 | /* Let's treat INVLPGA the same as INVLPG (can be optimized!) */ | 1982 | /* Let's treat INVLPGA the same as INVLPG (can be optimized!) */ |
1980 | kvm_mmu_invlpg(vcpu, vcpu->arch.regs[VCPU_REGS_RAX]); | 1983 | kvm_mmu_invlpg(vcpu, vcpu->arch.regs[VCPU_REGS_RAX]); |
1981 | 1984 | ||
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index 3cc8f444be14..7e1f08e959bc 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h | |||
@@ -469,6 +469,29 @@ TRACE_EVENT(kvm_nested_intr_vmexit, | |||
469 | 469 | ||
470 | TP_printk("rip: 0x%016llx\n", __entry->rip) | 470 | TP_printk("rip: 0x%016llx\n", __entry->rip) |
471 | ); | 471 | ); |
472 | |||
473 | /* | ||
474 | * Tracepoint for nested #vmexit because of interrupt pending | ||
475 | */ | ||
476 | TRACE_EVENT(kvm_invlpga, | ||
477 | TP_PROTO(__u64 rip, int asid, u64 address), | ||
478 | TP_ARGS(rip, asid, address), | ||
479 | |||
480 | TP_STRUCT__entry( | ||
481 | __field( __u64, rip ) | ||
482 | __field( int, asid ) | ||
483 | __field( __u64, address ) | ||
484 | ), | ||
485 | |||
486 | TP_fast_assign( | ||
487 | __entry->rip = rip; | ||
488 | __entry->asid = asid; | ||
489 | __entry->address = address; | ||
490 | ), | ||
491 | |||
492 | TP_printk("rip: 0x%016llx asid: %d address: 0x%016llx\n", | ||
493 | __entry->rip, __entry->asid, __entry->address) | ||
494 | ); | ||
472 | #endif /* _TRACE_KVM_H */ | 495 | #endif /* _TRACE_KVM_H */ |
473 | 496 | ||
474 | /* This part must be outside protection */ | 497 | /* This part must be outside protection */ |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2cf4146b425a..86596fc7941c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -4988,3 +4988,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmrun); | |||
4988 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit); | 4988 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit); |
4989 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit_inject); | 4989 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit_inject); |
4990 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_intr_vmexit); | 4990 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_intr_vmexit); |
4991 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_invlpga); | ||