diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2014-01-04 12:47:21 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-01-17 04:22:15 -0500 |
commit | 542060ea79c861e100411a5a44df747b56a693df (patch) | |
tree | 650b2a87156fdebfc66574dc88e6ed8fc5f6d089 | |
parent | 533558bcb69ef28aff81b6ae9acda8943575319f (diff) |
KVM: nVMX: Add tracepoints for nested_vmexit and nested_vmexit_inject
Already used by nested SVM for tracing nested vmexit: kvm_nested_vmexit
marks exits from L2 to L0 while kvm_nested_vmexit_inject marks vmexits
that are reflected to L1.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/vmx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e3578b301d81..e539c45eb669 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -6697,6 +6697,13 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) | |||
6697 | struct vmcs12 *vmcs12 = get_vmcs12(vcpu); | 6697 | struct vmcs12 *vmcs12 = get_vmcs12(vcpu); |
6698 | u32 exit_reason = vmx->exit_reason; | 6698 | u32 exit_reason = vmx->exit_reason; |
6699 | 6699 | ||
6700 | trace_kvm_nested_vmexit(kvm_rip_read(vcpu), exit_reason, | ||
6701 | vmcs_readl(EXIT_QUALIFICATION), | ||
6702 | vmx->idt_vectoring_info, | ||
6703 | intr_info, | ||
6704 | vmcs_read32(VM_EXIT_INTR_ERROR_CODE), | ||
6705 | KVM_ISA_VMX); | ||
6706 | |||
6700 | if (vmx->nested.nested_run_pending) | 6707 | if (vmx->nested.nested_run_pending) |
6701 | return 0; | 6708 | return 0; |
6702 | 6709 | ||
@@ -8469,6 +8476,13 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason, | |||
8469 | prepare_vmcs12(vcpu, vmcs12, exit_reason, exit_intr_info, | 8476 | prepare_vmcs12(vcpu, vmcs12, exit_reason, exit_intr_info, |
8470 | exit_qualification); | 8477 | exit_qualification); |
8471 | 8478 | ||
8479 | trace_kvm_nested_vmexit_inject(vmcs12->vm_exit_reason, | ||
8480 | vmcs12->exit_qualification, | ||
8481 | vmcs12->idt_vectoring_info_field, | ||
8482 | vmcs12->vm_exit_intr_info, | ||
8483 | vmcs12->vm_exit_intr_error_code, | ||
8484 | KVM_ISA_VMX); | ||
8485 | |||
8472 | cpu = get_cpu(); | 8486 | cpu = get_cpu(); |
8473 | vmx->loaded_vmcs = &vmx->vmcs01; | 8487 | vmx->loaded_vmcs = &vmx->vmcs01; |
8474 | vmx_vcpu_put(vcpu); | 8488 | vmx_vcpu_put(vcpu); |