diff options
author | Avi Kivity <avi@redhat.com> | 2010-11-18 06:09:54 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:29:41 -0500 |
commit | 586f9607962cd982293759a4e95ff06e75be5225 (patch) | |
tree | efce3a218f0268e4a066d1621d594951d6ac569e /arch/x86/kvm/svm.c | |
parent | aa17911e3c21b63e3bf94c580ed029d6dad816b4 (diff) |
KVM: Add instruction-set-specific exit qualifications to kvm_exit trace
The exit reason alone is insufficient to understand exactly why an exit
occured; add ISA-specific trace parameters for additional information.
Because fetching these parameters is expensive on vmx, and because these
parameters are fetched even if tracing is disabled, we fetch the
parameters via a callback instead of as traditional trace arguments.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 78a23086e16d..28274cf307ba 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -2974,6 +2974,14 @@ void dump_vmcb(struct kvm_vcpu *vcpu) | |||
2974 | 2974 | ||
2975 | } | 2975 | } |
2976 | 2976 | ||
2977 | static void svm_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2) | ||
2978 | { | ||
2979 | struct vmcb_control_area *control = &to_svm(vcpu)->vmcb->control; | ||
2980 | |||
2981 | *info1 = control->exit_info_1; | ||
2982 | *info2 = control->exit_info_2; | ||
2983 | } | ||
2984 | |||
2977 | static int handle_exit(struct kvm_vcpu *vcpu) | 2985 | static int handle_exit(struct kvm_vcpu *vcpu) |
2978 | { | 2986 | { |
2979 | struct vcpu_svm *svm = to_svm(vcpu); | 2987 | struct vcpu_svm *svm = to_svm(vcpu); |
@@ -3684,7 +3692,9 @@ static struct kvm_x86_ops svm_x86_ops = { | |||
3684 | .get_tdp_level = get_npt_level, | 3692 | .get_tdp_level = get_npt_level, |
3685 | .get_mt_mask = svm_get_mt_mask, | 3693 | .get_mt_mask = svm_get_mt_mask, |
3686 | 3694 | ||
3695 | .get_exit_info = svm_get_exit_info, | ||
3687 | .exit_reasons_str = svm_exit_reasons_str, | 3696 | .exit_reasons_str = svm_exit_reasons_str, |
3697 | |||
3688 | .get_lpage_level = svm_get_lpage_level, | 3698 | .get_lpage_level = svm_get_lpage_level, |
3689 | 3699 | ||
3690 | .cpuid_update = svm_cpuid_update, | 3700 | .cpuid_update = svm_cpuid_update, |