Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753860AbbDTPDU (ORCPT ); Mon, 20 Apr 2015 11:03:20 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:51174 "EHLO e28smtp02.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbbDTPDR (ORCPT ); Mon, 20 Apr 2015 11:03:17 -0400 From: Hemant Kumar To: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, acme@kernel.org, peterz@infradead.org, mingo@kernel.org, mpe@ellerman.id.au, maddy@linux.vnet.ibm.com, warrier@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com, paulus@samba.org, Hemant Kumar Subject: [PATCH v2 1/5] kvm/powerpc: Export exit reasons as uapi Date: Mon, 20 Apr 2015 20:32:11 +0530 Message-Id: <1429542135-10632-2-git-send-email-hemant@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1429542135-10632-1-git-send-email-hemant@linux.vnet.ibm.com> References: <1429542135-10632-1-git-send-email-hemant@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042015-0005-0000-0000-000004DDC571 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3919 Lines: 131 To analyze the kvm exits with perf, we will need to map the exit codes with the exit reasons. Such a mapping exists today in trace_book3s.h. But its not exported to tools like perf. This patch moves these kvm exit reasons and their mapping from "arch/powerpc/kvm/trace_book3s.h" to "arch/powerpc/include/uapi/asm/trace_book3s.h". We will also need to change the path of "trace_book3s.h" included in files "trace_hv.h" and "trace_pr.h". Signed-off-by: Hemant Kumar --- arch/powerpc/include/uapi/asm/trace_book3s.h | 32 ++++++++++++++++++++++++++++ arch/powerpc/kvm/trace_book3s.h | 32 ---------------------------- arch/powerpc/kvm/trace_hv.h | 2 +- arch/powerpc/kvm/trace_pr.h | 2 +- 4 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 arch/powerpc/include/uapi/asm/trace_book3s.h delete mode 100644 arch/powerpc/kvm/trace_book3s.h diff --git a/arch/powerpc/include/uapi/asm/trace_book3s.h b/arch/powerpc/include/uapi/asm/trace_book3s.h new file mode 100644 index 0000000..f647ce0 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/trace_book3s.h @@ -0,0 +1,32 @@ +#if !defined(_TRACE_KVM_BOOK3S_H) +#define _TRACE_KVM_BOOK3S_H + +/* + * Common defines used by the trace macros in trace_pr.h and trace_hv.h + */ + +#define kvm_trace_symbol_exit \ + {0x100, "SYSTEM_RESET"}, \ + {0x200, "MACHINE_CHECK"}, \ + {0x300, "DATA_STORAGE"}, \ + {0x380, "DATA_SEGMENT"}, \ + {0x400, "INST_STORAGE"}, \ + {0x480, "INST_SEGMENT"}, \ + {0x500, "EXTERNAL"}, \ + {0x501, "EXTERNAL_LEVEL"}, \ + {0x502, "EXTERNAL_HV"}, \ + {0x600, "ALIGNMENT"}, \ + {0x700, "PROGRAM"}, \ + {0x800, "FP_UNAVAIL"}, \ + {0x900, "DECREMENTER"}, \ + {0x980, "HV_DECREMENTER"}, \ + {0xc00, "SYSCALL"}, \ + {0xd00, "TRACE"}, \ + {0xe00, "H_DATA_STORAGE"}, \ + {0xe20, "H_INST_STORAGE"}, \ + {0xe40, "H_EMUL_ASSIST"}, \ + {0xf00, "PERFMON"}, \ + {0xf20, "ALTIVEC"}, \ + {0xf40, "VSX"} + +#endif diff --git a/arch/powerpc/kvm/trace_book3s.h b/arch/powerpc/kvm/trace_book3s.h deleted file mode 100644 index f647ce0..0000000 --- a/arch/powerpc/kvm/trace_book3s.h +++ /dev/null @@ -1,32 +0,0 @@ -#if !defined(_TRACE_KVM_BOOK3S_H) -#define _TRACE_KVM_BOOK3S_H - -/* - * Common defines used by the trace macros in trace_pr.h and trace_hv.h - */ - -#define kvm_trace_symbol_exit \ - {0x100, "SYSTEM_RESET"}, \ - {0x200, "MACHINE_CHECK"}, \ - {0x300, "DATA_STORAGE"}, \ - {0x380, "DATA_SEGMENT"}, \ - {0x400, "INST_STORAGE"}, \ - {0x480, "INST_SEGMENT"}, \ - {0x500, "EXTERNAL"}, \ - {0x501, "EXTERNAL_LEVEL"}, \ - {0x502, "EXTERNAL_HV"}, \ - {0x600, "ALIGNMENT"}, \ - {0x700, "PROGRAM"}, \ - {0x800, "FP_UNAVAIL"}, \ - {0x900, "DECREMENTER"}, \ - {0x980, "HV_DECREMENTER"}, \ - {0xc00, "SYSCALL"}, \ - {0xd00, "TRACE"}, \ - {0xe00, "H_DATA_STORAGE"}, \ - {0xe20, "H_INST_STORAGE"}, \ - {0xe40, "H_EMUL_ASSIST"}, \ - {0xf00, "PERFMON"}, \ - {0xf20, "ALTIVEC"}, \ - {0xf40, "VSX"} - -#endif diff --git a/arch/powerpc/kvm/trace_hv.h b/arch/powerpc/kvm/trace_hv.h index 33d9daf..02d0a07 100644 --- a/arch/powerpc/kvm/trace_hv.h +++ b/arch/powerpc/kvm/trace_hv.h @@ -2,7 +2,7 @@ #define _TRACE_KVM_HV_H #include -#include "trace_book3s.h" +#include #include #include diff --git a/arch/powerpc/kvm/trace_pr.h b/arch/powerpc/kvm/trace_pr.h index 810507c..a9850c6 100644 --- a/arch/powerpc/kvm/trace_pr.h +++ b/arch/powerpc/kvm/trace_pr.h @@ -3,7 +3,7 @@ #define _TRACE_KVM_PR_H #include -#include "trace_book3s.h" +#include #undef TRACE_SYSTEM #define TRACE_SYSTEM kvm_pr -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/