KVM: MMU: fix kvm_mmu_pagetable_walk tracepoint
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Wed, 20 Jun 2012 08:00:00 +0000 (16:00 +0800)
committerAvi Kivity <avi@redhat.com>
Wed, 11 Jul 2012 13:51:22 +0000 (16:51 +0300)
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>
arch/x86/kvm/mmutrace.h
arch/x86/kvm/paging_tmpl.h

index c364abc8d03403490c7d2228cfe5c9c2257545f6..cd6e98333ba3830a7f6e29bc7984a6311b7b636c 100644 (file)
@@ -54,8 +54,8 @@
  */
 TRACE_EVENT(
        kvm_mmu_pagetable_walk,
-       TP_PROTO(u64 addr, int write_fault, int user_fault, int fetch_fault),
-       TP_ARGS(addr, write_fault, user_fault, fetch_fault),
+       TP_PROTO(u64 addr, u32 pferr),
+       TP_ARGS(addr, pferr),
 
        TP_STRUCT__entry(
                __field(__u64, addr)
@@ -64,8 +64,7 @@ TRACE_EVENT(
 
        TP_fast_assign(
                __entry->addr = addr;
-               __entry->pferr = (!!write_fault << 1) | (!!user_fault << 2)
-                                | (!!fetch_fault << 4);
+               __entry->pferr = pferr;
        ),
 
        TP_printk("addr %llx pferr %x %s", __entry->addr, __entry->pferr,
index 34f970937ef10469bb079a19cbd7e96ae624e4eb..bb7cf01cae76ea735f759ef3c3d2428c271a7151 100644 (file)
@@ -154,8 +154,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
        const int fetch_fault = access & PFERR_FETCH_MASK;
        u16 errcode = 0;
 
-       trace_kvm_mmu_pagetable_walk(addr, write_fault, user_fault,
-                                    fetch_fault);
+       trace_kvm_mmu_pagetable_walk(addr, access);
 retry_walk:
        eperm = false;
        walker->level = mmu->root_level;