From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 11 May 2015 22:14:27 +0000 Subject: Re: [PATCH v3 3/3] kvm/powerpc: Export HCALL reason codes Message-Id: <1431382467.16357.476.camel@freescale.com> List-Id: References: <1431046385-5772-1-git-send-email-hemant@linux.vnet.ibm.com> <1431046385-5772-3-git-send-email-hemant@linux.vnet.ibm.com> In-Reply-To: <1431046385-5772-3-git-send-email-hemant@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hemant Kumar Cc: linux-kernel@vger.kernel.org, maddy@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com, mpe@ellerman.id.au, agraf@suse.de, kvm-ppc@vger.kernel.org, paulus@samba.org, warrier@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, acme@kernel.org, mingo@redhat.com, peterz@infradead.org On Fri, 2015-05-08 at 06:23 +0530, Hemant Kumar wrote: > For perf to analyze the KVM events like hcalls, we need the > hypervisor calls and their codes to be exported through uapi. > > This patch moves most of the pSeries hcall codes from > arch/powerpc/include/asm/hvcall.h to > arch/powerpc/include/uapi/asm/hcall_codes.h. > It also moves the mapping from > arch/powerpc/kvm/trace_hv.h to > arch/powerpc/include/uapi/asm/trace_hcall.h. > > Signed-off-by: Hemant Kumar > --- > arch/powerpc/include/asm/hvcall.h | 120 +-------------------------- > arch/powerpc/include/uapi/asm/hcall_codes.h | 123 ++++++++++++++++++++++++++++ > arch/powerpc/include/uapi/asm/trace_hcall.h | 122 +++++++++++++++++++++++++++ > arch/powerpc/kvm/trace_hv.h | 117 +------------------------- When moving to uapi please add proper namespacing to indicate that this is pseries specific. > diff --git a/arch/powerpc/include/uapi/asm/trace_hcall.h b/arch/powerpc/include/uapi/asm/trace_hcall.h > new file mode 100644 > index 0000000..00eac01 > --- /dev/null > +++ b/arch/powerpc/include/uapi/asm/trace_hcall.h > @@ -0,0 +1,122 @@ > +#ifndef _KVM_TRACE_HCALL_MAP_H > +#define _KVM_TRACE_HCALL_MAP_H > + > +#include "hcall_codes.h" > + > +#define kvm_trace_symbol_hcall\ > + {H_REMOVE,"H_REMOVE"}, \ > + {H_ENTER,"H_ENTER"}, \ > + {H_READ,"H_READ"}, \ > + {H_CLEAR_MOD,"H_CLEAR_MOD"}, \ This is a rather odd way of exposing an array to userspace... -Scott