diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-06-20 04:00:00 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-07-11 09:51:22 -0400 |
commit | 6fbc277053836a4d80c72a0843bcbc7595b31e87 (patch) | |
tree | 0d5b06c7a2ac3757587993c22e6006a743abe9be /arch/x86 | |
parent | a72faf2504dfc12ff9bfb486a42f2761296666ff (diff) |
KVM: MMU: fix kvm_mmu_pagetable_walk tracepoint
The P bit of page fault error code is missed in this tracepoint, fix it by
passing the full error code
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/mmutrace.h | 7 | ||||
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h index c364abc8d034..cd6e98333ba3 100644 --- a/arch/x86/kvm/mmutrace.h +++ b/arch/x86/kvm/mmutrace.h | |||
@@ -54,8 +54,8 @@ | |||
54 | */ | 54 | */ |
55 | TRACE_EVENT( | 55 | TRACE_EVENT( |
56 | kvm_mmu_pagetable_walk, | 56 | kvm_mmu_pagetable_walk, |
57 | TP_PROTO(u64 addr, int write_fault, int user_fault, int fetch_fault), | 57 | TP_PROTO(u64 addr, u32 pferr), |
58 | TP_ARGS(addr, write_fault, user_fault, fetch_fault), | 58 | TP_ARGS(addr, pferr), |
59 | 59 | ||
60 | TP_STRUCT__entry( | 60 | TP_STRUCT__entry( |
61 | __field(__u64, addr) | 61 | __field(__u64, addr) |
@@ -64,8 +64,7 @@ TRACE_EVENT( | |||
64 | 64 | ||
65 | TP_fast_assign( | 65 | TP_fast_assign( |
66 | __entry->addr = addr; | 66 | __entry->addr = addr; |
67 | __entry->pferr = (!!write_fault << 1) | (!!user_fault << 2) | 67 | __entry->pferr = pferr; |
68 | | (!!fetch_fault << 4); | ||
69 | ), | 68 | ), |
70 | 69 | ||
71 | TP_printk("addr %llx pferr %x %s", __entry->addr, __entry->pferr, | 70 | TP_printk("addr %llx pferr %x %s", __entry->addr, __entry->pferr, |
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 34f970937ef1..bb7cf01cae76 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -154,8 +154,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, | |||
154 | const int fetch_fault = access & PFERR_FETCH_MASK; | 154 | const int fetch_fault = access & PFERR_FETCH_MASK; |
155 | u16 errcode = 0; | 155 | u16 errcode = 0; |
156 | 156 | ||
157 | trace_kvm_mmu_pagetable_walk(addr, write_fault, user_fault, | 157 | trace_kvm_mmu_pagetable_walk(addr, access); |
158 | fetch_fault); | ||
159 | retry_walk: | 158 | retry_walk: |
160 | eperm = false; | 159 | eperm = false; |
161 | walker->level = mmu->root_level; | 160 | walker->level = mmu->root_level; |