lkml.org 
[lkml]   [2012]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH v2 16/16] KVM: MMU: fix kvm_mmu_pagetable_walk tracepoint
    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>
    ---
    arch/x86/kvm/mmutrace.h | 7 +++----
    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 84da94f..e762d35 100644
    --- a/arch/x86/kvm/mmutrace.h
    +++ b/arch/x86/kvm/mmutrace.h
    @@ -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,
    diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
    index c85dbbe..ff85616 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,
    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;
    --
    1.7.7.6


    \
     
     \ /
      Last update: 2012-04-13 12:19    [from the cache]
    ©2003-2014 Jasper Spaans. hosted at Digital Ocean