]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: SVM: add tracing support for TDP page faults
authorJoerg Roedel <joerg.roedel@amd.com>
Wed, 30 Apr 2008 15:56:04 +0000 (17:56 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 20 Jul 2008 09:40:48 +0000 (12:40 +0300)
To distinguish between real page faults and nested page faults they should be
traced as different events. This is implemented by this patch.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/svm.c
include/asm-x86/kvm.h

index 8953292acfd94ef4ce5085594824a1acd7726a97..218949cce1a0975eac7cd566bfa1cd75471a975d 100644 (file)
@@ -1011,6 +1011,10 @@ static int pf_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
                KVMTRACE_3D(PAGE_FAULT, &svm->vcpu, error_code,
                            (u32)fault_address, (u32)(fault_address >> 32),
                            handler);
+       else
+               KVMTRACE_3D(TDP_FAULT, &svm->vcpu, error_code,
+                           (u32)fault_address, (u32)(fault_address >> 32),
+                           handler);
 
        return kvm_mmu_page_fault(&svm->vcpu, fault_address, error_code);
 }
index 80eefef2cc76cd3b54ba93856a8fc500f639d736..6f1840812e595f05b7d5a064412e05d7e756b1cc 100644 (file)
@@ -228,5 +228,6 @@ struct kvm_pit_state {
 #define KVM_TRC_CLTS             (KVM_TRC_HANDLER + 0x12)
 #define KVM_TRC_LMSW             (KVM_TRC_HANDLER + 0x13)
 #define KVM_TRC_APIC_ACCESS      (KVM_TRC_HANDLER + 0x14)
+#define KVM_TRC_TDP_FAULT        (KVM_TRC_HANDLER + 0x15)
 
 #endif