From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v2 08/13] x86/PMU: Interface for setting PMU mode and flags Date: Wed, 25 Sep 2013 10:55:57 -0400 Message-ID: <5242F97D.9080901@oracle.com> References: <1379670132-1748-1-git-send-email-boris.ostrovsky@oracle.com> <1379670132-1748-9-git-send-email-boris.ostrovsky@oracle.com> <52430B3402000078000F64C2@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VOqTT-0006Ci-LF for xen-devel@lists.xenproject.org; Wed, 25 Sep 2013 14:53:55 +0000 In-Reply-To: <52430B3402000078000F64C2@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: suravee.suthikulpanit@amd.com, George.Dunlap@eu.citrix.com, jacob.shin@amd.com, eddie.dong@intel.com, dietmar.hahn@ts.fujitsu.com, jun.nakajima@intel.com, xen-devel List-Id: xen-devel@lists.xenproject.org On 09/25/2013 10:11 AM, Jan Beulich wrote: >>>> On 20.09.13 at 11:42, Boris Ostrovsky wrote: >> --- a/xen/include/public/xen.h >> +++ b/xen/include/public/xen.h >> @@ -101,6 +101,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t); >> #define __HYPERVISOR_kexec_op 37 >> #define __HYPERVISOR_tmem_op 38 >> #define __HYPERVISOR_xc_reserved_op 39 /* reserved for XenClient */ >> +#define __HYPERVISOR_xenpmu_op 40 >> >> /* Architecture-specific hypercall definitions. */ >> #define __HYPERVISOR_arch_0 48 > I wonder whether you wouldn't better use an arch-specific hypercall > number here - there's really very little that's generic in what I have > seen so far. Some of xenpmu commands (querying PMU mode/flags, PMU initialization/de-initialization) seem generic to me. They may call arch-specific routines. >> +/* Parameters structure for HYPERVISOR_xenpmu_op call */ >> +struct xenpmu_params { >> + /* IN/OUT parameters */ >> + union { >> + struct version { >> + uint8_t maj; >> + uint8_t min; >> + } version; >> + uint64_t pad; >> + }; >> + union { >> + uint64_t val; >> + void *valp; > Without there also being a handle here I can't see how you could > make use of the pointer. Tha't really a placeholder, valp is not used anywhere. I can replace it with XEN_GUEST_HANDLE. -boris