aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2011-07-11 15:34:24 -0400
committerAvi Kivity <avi@redhat.com>2011-07-24 04:50:41 -0400
commit4f0226482d20f104e943ee9e6f1218b573953f63 (patch)
tree5e74a1b7829e48433640de3708e593b365cb7405 /arch/x86/kvm/x86.c
parentce88decffd17bf9f373cc233c961ad2054965667 (diff)
KVM: MMU: trace mmio page fault
Add tracepoints to trace mmio page fault Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2c9661f230a9..84a28ea45fa4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4021,6 +4021,7 @@ static int vcpu_mmio_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva,
4021 vcpu->arch.access)) { 4021 vcpu->arch.access)) {
4022 *gpa = vcpu->arch.mmio_gfn << PAGE_SHIFT | 4022 *gpa = vcpu->arch.mmio_gfn << PAGE_SHIFT |
4023 (gva & (PAGE_SIZE - 1)); 4023 (gva & (PAGE_SIZE - 1));
4024 trace_vcpu_match_mmio(gva, *gpa, write, false);
4024 return 1; 4025 return 1;
4025 } 4026 }
4026 4027
@@ -4036,8 +4037,10 @@ static int vcpu_mmio_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva,
4036 if ((*gpa & PAGE_MASK) == APIC_DEFAULT_PHYS_BASE) 4037 if ((*gpa & PAGE_MASK) == APIC_DEFAULT_PHYS_BASE)
4037 return 1; 4038 return 1;
4038 4039
4039 if (vcpu_match_mmio_gpa(vcpu, *gpa)) 4040 if (vcpu_match_mmio_gpa(vcpu, *gpa)) {
4041 trace_vcpu_match_mmio(gva, *gpa, write, true);
4040 return 1; 4042 return 1;
4043 }
4041 4044
4042 return 0; 4045 return 0;
4043} 4046}