Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934433AbbEMDWh (ORCPT ); Tue, 12 May 2015 23:22:37 -0400 Received: from mail-bl2on0120.outbound.protection.outlook.com ([65.55.169.120]:46923 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934418AbbEMDWe (ORCPT ); Tue, 12 May 2015 23:22:34 -0400 Authentication-Results: linux.vnet.ibm.com; dkim=none (message not signed) header.d=none; Message-ID: <1431487345.3868.2.camel@freescale.com> Subject: Re: [PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc From: Scott Wood To: Hemant Kumar CC: , , , , , , , , , , Date: Tue, 12 May 2015 22:22:25 -0500 In-Reply-To: <555224A4.5050502@linux.vnet.ibm.com> References: <1431047266-6206-1-git-send-email-hemant@linux.vnet.ibm.com> <1431382120.16357.471.camel@freescale.com> <555224A4.5050502@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: SN1PR07CA0012.namprd07.prod.outlook.com (25.162.170.150) To BN3PR03MB1479.namprd03.prod.outlook.com (25.163.35.142) X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1479;2:F0uc4F39d70NolM1HE/IzhspPnH1BGWQ5Z62Ff19r2sba4pzoNr7tj2aQ6RQWEgh;2:QFrpcZZyYOUxk8c+7EkPeGYoNtJQG+q1dVOf7P93cjUVdgoLWrev+Zes1vy1nm81ZBTTir+QWGYzYIKEpMFP22DaHC9oo4KZl1tGzzlJC93eihwwQoncNltQASuXOiITBSDjx+MCIC0rVN346ye/gg==;6:iswj2ft196Dkr1EjqlfhhyUdLpIh2cFIq1U2Zz6kqg+EQvt3UcPuQf2MYCch0LZGzWLrqroOsxLeQ2LCul/e5j5mcCoXsu50xRIgZt+9BX6R/H7k6qGnhdrhUXIIIvBJMXXlIQk6t7KjM6MjETZ238tDWX/leJ9t27kaDxRvXYhaZpflGRLAakU6+BL8C4MjpH89CcIaTBtezwbev2WALF7NXsXkTMuaBvy4lfryeEsvD7Scm9tmmRcG1lfywP9tUNj/VI+58kYP4qhJLnbqoVPXRfwlR/JQ35NdhMTDVGDSvLmbOeZsyThTQJrrxCYhYwNbm2IZkCDn2RaNPYtuhNL504YC63AeRSEUHKoBLO6h8ef9ngQjGFahkxQC9zvL2TgtnW45FB0DBKXm8p1yhokHRQitztBbE8tbSpxfQ9s+Ago86lo80r9BUAmInk0zj+VCqEmCU60LIibuxJ+5k6MH/6w5P+2gMiSPWbGNh/IQ6LImVVdiO4Sqevir8yKL X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1479; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR03MB1479;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1479; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1479;3:gIdRFYUdWXZ50S6/DLasXAauORuFxZ5h9tdSz+WKhBSNWJN2BEk7aOBRH4kW8Od0rxRhrLqdflhxyOs7ZbrvstssEltW43HCc2jiNNx1IKYs+Am+9hLqiLYfzdLtf11DZCG7F7sJrSCRGmfFzvqDOgMungnV1Glm/UcIXv/Di/CC+efRLrcNmhHjBIUCFLTrwfHkLFoGUq1g10zlfuNHWwQMLhjE4sqeWvW5WQSo+VY4YOuTahPpeIig+WOnDkGkitr3TKc3/z5L5faYhKQI97fmY/0z9J27wAhx5Kal+f0= X-Forefront-PRVS: 0575F81B58 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(377424004)(24454002)(479174004)(51704005)(23676002)(50226001)(33646002)(86362001)(92566002)(77096005)(77156002)(62966003)(47776003)(50466002)(2950100001)(40100003)(46102003)(189998001)(42186005)(87976001)(122386002)(5820100001)(36756003)(110136002)(5001960100002)(103116003)(50986999)(76176999)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1479;H:[IPv6:2601:2:5800:3f7:12bf:48ff:fe84:c9a0];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1479;9:7llERa3S9x3RiJX5jPBZ3m4JVApfx6NEsbmjHYKjRdp8yRBaykmh+by34zb0KO8HR6jIR71B33Cz1BBgjdeaOWjLO3d/nT2uPcJJLtidWvdX4FphUgX6Ee4e+hTEqKR469jYcBIPC8f4FAp+YObDLoO8D2z3XY/F5GsK13+k5r7QKimk3xaqmBXlXsigvEwLDW020pK6UXr1xAdWEhw34R4QcRhEax8Ihik967JPtQI2itIbV/+CydBwhFTca1N7dUSDIkSecdlEL6MK3zpB44bHbAdHlNjBPL/kb4aIP/lk3VdVGiiM5uWqyh1m48zxSSVqksD7e9PZOvllYqV7tLFRQvIfj2djmGn9tHIjAxWXYYgrLC1eC6z8MhkxWOhj7ZJZntlCmXuHlIgMxSrPVUNNT+Os+/a7bNx6gFeqZBMd/YTMt7epjtjgTpqc3Mjm0423CcHaViGwberNJukvpw4cpf3P2ahxuMzizSKjnTZ8BmPzzxWBrJ1tZyQJb5JtzsNkKy5/N5LE2hC0k1EZQSFtawdaNwUel+qs/Jrha+yknUPFWnGCFLKagaaE0Q/Osn+HYetaUWgx47NzfRgAIJgkqnU9eaMpubNwpeVeC7ygjKbqvBk6PDaDZvQFCMZfWb+7H9F1okWCIqDr4/+SBVElTTj5Q+XbKlGwUOnfVW40cs6SCFObaYK0tGDZs3m3nCc7yhXYj3jZC8eoJr/EGqULglnBPonWlsDqSHDXa95td4Pe3c31lHW8iSj9AqRXNSuAU0SypyB2lhO19CNHffzwELbmYDWfMFh2HYYzoD0upOxt90IxkiJpPg8807qzWJd5Tm95bdGKxLUZ+2MEAw== X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1479;3:Epxm7B5C2zbuyqFkp/ZPmDbnLCeG/Vro3IcMVJ/T/iUFlaEj/mpvgZaDjikOpMWG52B3CDnxs0hHAJSYh9vxCrbEbu0POYKwuGZ2GM1z6LI1c56OZlwmHDBCks6GJ0mOAOiz2DG80xpeRHi/i0mIrw==;10:sMvn+c3DP6OTyXmFkw5x7LOu6aa+uLdulQlewsCV2XlaOVlJrtOY2fEwXu3MkdmfMhWm7SmAnbuDWaZIbNRAgczYGeISa146upr4KpM1CVA=;6:ldKsca5rU7O+zyPK9GcKt6O4PG0Fz7vRtqkqhqtigqnSlWeMiicWUv2lrO8Ruu9B X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2015 03:22:31.0995 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1479 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2016 Lines: 53 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 > >> +#include > >> + > >> +#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 -- 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/