Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934339AbbEMDVy (ORCPT ); Tue, 12 May 2015 23:21:54 -0400 Received: from mail-bl2on0114.outbound.protection.outlook.com ([65.55.169.114]:6887 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934004AbbEMDVx (ORCPT ); Tue, 12 May 2015 23:21:53 -0400 Authentication-Results: linux.vnet.ibm.com; dkim=none (message not signed) header.d=none; Message-ID: <1431487299.3868.1.camel@freescale.com> Subject: Re: [PATCH v3 3/3] kvm/powerpc: Export HCALL reason codes From: Scott Wood To: Hemant Kumar CC: , , , , , , , , , , , Date: Tue, 12 May 2015 22:21:39 -0500 In-Reply-To: <55522774.5030400@linux.vnet.ibm.com> References: <1431046385-5772-1-git-send-email-hemant@linux.vnet.ibm.com> <1431046385-5772-3-git-send-email-hemant@linux.vnet.ibm.com> <1431382467.16357.476.camel@freescale.com> <55522774.5030400@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: SN1PR07CA0009.namprd07.prod.outlook.com (25.162.170.147) To BN3PR03MB1478.namprd03.prod.outlook.com (25.163.35.141) X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1478;2:OMWrL4zM9f87c/0TnRe4uti04ypscDstcADhFu7TLh/lMPZ0/ISSjf0XgCzbLS1W;2:A+FHDKXdjQRBbGaMlFJOdDXw8DgzgZ/fvRuZOVt2OBc/WwhLZ+oYrTgVsfA1gs7/Mx/Nr97QyzrBV02TIiB6u5NyEkIYlRIQPI0DcCCuHRlqGY7ij4TTe/uS2wOP8NZNemD/SE/JMCinbBdV0ODTew==;6:1dHnO2Y51X5GQGESsoDi/2ZtRIddEfMxto7n3FqNJlgcd2/l3i/B60elCOPX0LDLth7JTvVzaAJeKoooWOS9tAw04CWsO/J91ZvNgVFecOpMIVenLH6PNY+IBVc+7dButlkkiSo440KdT4s/GsWdhfd0jDMOGguD7xkdjrZ1newXmZyZlBS8q/UlZESoJvzvFu+e8z9mDV1xQHgFQI4YKuEmZq/KDgyOkzXsFpjHeUpggyxTy27o6M7wSFDs8LSZ8ID73Gvx3e71EcVcNi/aGVrBHVjoAtEoc4IwYQ2JpQrmzOMxsje0bItBYUho8rp+G5NSZ7XilEv+Gtr0JUb4eYDS3aMNzj8q8cHl8iv4Rh7z+Zqvr19HsQF34dwHnKY7zPBIrm6uljnpp546k/bPZwfuVAbi2cb0F02yYTUYQlmSDx8fI4/kaDUzZhm0jqbo91TnQcQl7mPBXqCZFVd8si9dsGtAH4Ni7f/Ya9FQlxatcg4ztSX8Cp1E88bZPl2C X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1478; 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:BN3PR03MB1478;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1478; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1478;3:qlvSE3fGDlY3gRZ4Q4HbcI/Jqz+ZMtiy2vlinNU5rBKPf5xFFAU73ywLcvSGdaXT8bbbEtYggMnGtKJcamXmj/+UBG3BCuklCZHyLtFYofLQxMev7mNhesZVSXSbRiGp3GZgpT56a05jy7oxN8eV5zMAUq5cliTqM8tNnKy8z7s/K9MxuR1py3r007SLzCET/gNsumCk39IHF7P8FjzQrvnQ+JirnU0Ydad7Bv3CLgU+cUDmz4QBlmhEeewqHtshUeSCEO5zM9Y5VN7AAMZo6ggkCv7GiuvnZq7I8qWLGdY= X-Forefront-PRVS: 0575F81B58 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(377424004)(24454002)(479174004)(51704005)(23676002)(50226001)(93886004)(33646002)(86362001)(92566002)(77096005)(77156002)(62966003)(47776003)(50466002)(2950100001)(40100003)(46102003)(189998001)(42186005)(87976001)(122386002)(5820100001)(36756003)(110136002)(5001960100002)(103116003)(50986999)(76176999)(19580395003)(19580405001)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1478;H:[IPv6:2601:2:5800:3f7:12bf:48ff:fe84:c9a0];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1478;9:LmEBuKvlIISR09W/F+GmTgZ8M8wyCkvTfzqLrykFIzIzfRx+HaUnYs9eMo00pr5ur1XrgvTN626vcQUn55GI6xKQeGovkv+IpXpRVVwG8mcpe4evnCdNxMXT7gbNnPtXyFOUeoTYIlqnoRcGmkxPisviOV2ls49A3gEpDL351Z7r0LTT3S1BVhM6eQtrTwQCLJSIe1GKw/X1vlbEEECdLbRwe2FdCMXV64VKhtmGnFJoau/kfC3W4h3XdYkP1SmbQhr7QkhE86BM+MzJQEhrl2hUfIWqKVtin8CWKvOuC2+8sbu1RhyyI95DIjS9mc32zsL13VpCpuJjFFIKUzz0kcDOx+hzIJGiUNANmzLtc3M9/QKK2Wswqsgg206yG3PdHHsvCHedJCEcjPHQE8ZyH4QS4+e/M635wIKfDICX7U7A1p2Wawa3PvX4hVS6DH8mWj/SlvhRKMQ2R0DN4Ih/qmmY0H1R2i/vccA02pPUPXQqWVNlwfZXbvB8sxb+C6+c4CIxqeIMLSHSxXTjWUNJWy3U8ChY57eS/MbC4dcP2H9+wr5v59zWFyOmN92JkGZVrFRej68wxYDMMF0d8eYan7s0cnDyGO4i8PsYdCF087VgjaAgRbxcv9KFzEv2dWRcKEqmNYQB/yqkesyaTX5+V2Tej6mJyWwLY/jgPzA8SOxr3gglGToTgw+OGN7lEzUNPCMI5eFujvEu+nSvlPFnsVzSZh+8PUl31iaoXPIzoqNqtJPp4yTJPFvB+bsGGPshg10vy0CKHx9pIh3mWzztcaT3rRBXCPuqXxq9rBSaFEERwvgoibX2niw8YfQd5FGTuljFrvFq96BndYtoVeV9qBQUTw2lWR8HBA9ks5dV8yPlZQwPsNY6F/65p7D/dgpLUnFwI3ouhQBHH0Ove+nbX9Rhg4vGJ6vPRsnyir3XeTg= X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1478;3:ZrnJrHoc3hqodBrqDUCk4wYIcj2REIhTo6vUbobaBQBPJx8N2S26qdKWKK9ME9yYil0DChUR7VLCLyhNZ+wpFyK0vKfzQsqKD4wmXR4FnGF9TZhG1b6ZjuWUGla7kD0gOKaXcpQ7ktmfkgibuAEt8w==;10:E+P2d1hzLp4dHywKCi/Wr0Z2IiSaxTAJF3aPzj3c5xkEl9k8wefLEMW/fQtxfd/McUD5iHv7d4VeZW268KDpWw3okBYIfnfLvNxQYDysNvU=;6:JGre4WvNoFn+j5S6bYgyqEwzhS5Cr6cqr81kiCSF/ccKX9uv223Sm8syKN+YTUXM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2015 03:21:44.7294 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1478 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2542 Lines: 66 On Tue, 2015-05-12 at 21:46 +0530, Hemant Kumar wrote: > On 05/12/2015 03:44 AM, Scott Wood wrote: > > 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. > > > > Sure, will add that. Thanks. > >> 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... > > > > Didn't get you here. Can you please elaborate? > > I see some other files like arch/x86/include/uapi/asm/vmx.h exposing the > reasons in a similar way. It just seemed like sloppy API to not have any typing associated with it and require the user to wrap it in an actual array; I wasn't aware there was precedent for this construction in uapi. I also would have expected a macro that doesn't behave like a normal element of C syntax (function, variable name, type, etc) to have been capitalized. -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/