aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-11-18 06:09:54 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:29:41 -0500
commit586f9607962cd982293759a4e95ff06e75be5225 (patch)
treeefce3a218f0268e4a066d1621d594951d6ac569e /arch/x86/kvm/vmx.c
parentaa17911e3c21b63e3bf94c580ed029d6dad816b4 (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/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 24959105d7fc..ab05ff68bcd7 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3690,6 +3690,12 @@ static int (*kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = {
3690static const int kvm_vmx_max_exit_handlers = 3690static const int kvm_vmx_max_exit_handlers =
3691 ARRAY_SIZE(kvm_vmx_exit_handlers); 3691 ARRAY_SIZE(kvm_vmx_exit_handlers);
3692 3692
3693static void vmx_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2)
3694{
3695 *info1 = vmcs_readl(EXIT_QUALIFICATION);
3696 *info2 = vmcs_read32(VM_EXIT_INTR_INFO);
3697}
3698
3693/* 3699/*
3694 * The guest has exited. See if we can fix it or if we need userspace 3700 * The guest has exited. See if we can fix it or if we need userspace
3695 * assistance. 3701 * assistance.
@@ -4334,7 +4340,9 @@ static struct kvm_x86_ops vmx_x86_ops = {
4334 .get_tdp_level = get_ept_level, 4340 .get_tdp_level = get_ept_level,
4335 .get_mt_mask = vmx_get_mt_mask, 4341 .get_mt_mask = vmx_get_mt_mask,
4336 4342
4343 .get_exit_info = vmx_get_exit_info,
4337 .exit_reasons_str = vmx_exit_reasons_str, 4344 .exit_reasons_str = vmx_exit_reasons_str,
4345
4338 .get_lpage_level = vmx_get_lpage_level, 4346 .get_lpage_level = vmx_get_lpage_level,
4339 4347
4340 .cpuid_update = vmx_cpuid_update, 4348 .cpuid_update = vmx_cpuid_update,