From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v2 2/6] xen/PMU: Sysfs interface for setting Xen PMU mode Date: Tue, 10 Jun 2014 10:52:57 -0400 Message-ID: <53971BC9.3070607@oracle.com> References: <1402076686-26586-1-git-send-email-boris.ostrovsky@oracle.com> <1402076686-26586-3-git-send-email-boris.ostrovsky@oracle.com> <53970CB0.6030700@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53970CB0.6030700@citrix.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: David Vrabel Cc: kevin.tian@intel.com, xen-devel@lists.xen.org, dietmar.hahn@ts.fujitsu.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 06/10/2014 09:48 AM, David Vrabel wrote: > >> --- a/drivers/xen/sys-hypervisor.c >> +++ b/drivers/xen/sys-hypervisor.c >> @@ -20,6 +20,7 @@ >> #include >> #include >> #include >> +#include >> >> #define HYPERVISOR_ATTR_RO(_name) \ >> static struct hyp_sysfs_attr _name##_attr = __ATTR_RO(_name) >> @@ -368,6 +369,116 @@ static void xen_properties_destroy(void) >> sysfs_remove_group(hypervisor_kobj, &xen_properties_group); >> } >> >> +struct pmu_mode { >> + const char *name; >> + uint32_t mode; >> +}; >> + >> +struct pmu_mode pmu_modes[] = { >> + {"enable", XENPMU_MODE_ON}, >> + {"priv_enable", XENPMU_MODE_PRIV}, >> + {"disable", 0} >> +}; > > If there a better, more description set of options here? How about: > > "self", "all", "none"? Yes, that's better ("self" is in fact both guest and hypervisor for dom0 but it's probably OK). I'll need to rename macros as well. -boris