From: Scott Wood <scottwood@freescale.com>
To: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: maddy@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com,
peterz@infradead.org, linux-kernel@vger.kernel.org,
kvm-ppc@vger.kernel.org, agraf@suse.de, mingo@redhat.com,
paulus@samba.org, acme@kernel.org, warrier@linux.vnet.ibm.com,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc
Date: Tue, 12 May 2015 22:22:25 -0500 [thread overview]
Message-ID: <1431487345.3868.2.camel@freescale.com> (raw)
In-Reply-To: <555224A4.5050502@linux.vnet.ibm.com>
On Tue, 2015-05-12 at 21:34 +0530, Hemant Kumar wrote:
> Hi Scott,
>
> On 05/12/2015 03:38 AM, Scott Wood wrote:
> > On Fri, 2015-05-08 at 06:37 +0530, Hemant Kumar wrote:
> >> diff --git a/arch/powerpc/include/uapi/asm/kvm_perf.h b/arch/powerpc/include/uapi/asm/kvm_perf.h
> >> new file mode 100644
> >> index 0000000..30fa670
> >> --- /dev/null
> >> +++ b/arch/powerpc/include/uapi/asm/kvm_perf.h
> >> @@ -0,0 +1,15 @@
> >> +#ifndef _ASM_POWERPC_KVM_PERF_H
> >> +#define _ASM_POWERPC_KVM_PERF_H
> >> +
> >> +#include <asm/trace_book3s.h>
> >> +#include <asm/kvm.h>
> >> +
> >> +#define DECODE_STR_LEN 20
> >> +
> >> +#define VCPU_ID "vcpu_id"
> >> +
> >> +#define KVM_ENTRY_TRACE "kvm_hv:kvm_guest_enter"
> >> +#define KVM_EXIT_TRACE "kvm_hv:kvm_guest_exit"
> >> +#define KVM_EXIT_REASON "trap"
> >> +
> >> +#endif /* _ASM_POWERPC_KVM_PERF_H */
> > Please make sure that anything book3s-specific is named that way.
>
> Are you suggesting to name it to something like _ASM_POWERPC_BOOK3S_PERF_H ?
My concern is seeing a generically named "kvm_perf.h" include a file
called "trace_book3s.h" which defines "kvm_trace_symbol_hcall" with
presumably book3s-specific content, as well as wondering how much of the
rest of the file would be applicable if booke PPC were to implement perf
kvm.
I don't know enough about perf kvm to answer that question, but I've
seen enough cases of book3s or pseries specific code that was apparently
written with the belief that no other ppc64 implementations exist, or
that no other ppc implementations would want to implement a certain
feature, to be suspicous. Usually such cases can be dealt with after
the fact (albeit not as easily as if things were organized/namespaced
properly from the beginning), but this is uapi...
-Scott
next prev parent reply other threads:[~2015-05-13 3:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 1:07 [PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc Hemant Kumar
2015-05-08 1:07 ` [PATCH v3 2/2] perf/kvm: Support HCALL events Hemant Kumar
2015-05-08 4:28 ` [PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc Ingo Molnar
2015-05-08 6:16 ` Hemant Kumar
2015-05-08 6:18 ` Ingo Molnar
2015-05-11 22:08 ` Scott Wood
2015-05-12 16:04 ` Hemant Kumar
2015-05-13 3:22 ` Scott Wood [this message]
2015-05-21 4:03 ` Hemant Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431487345.3868.2.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=acme@kernel.org \
--cc=agraf@suse.de \
--cc=hemant@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=warrier@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).