[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/6] xen/PMU: Sysfs interface for setting Xen PMU mode
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 <xen/xenbus.h> #include <xen/interface/xen.h> #include <xen/interface/version.h> +#include <xen/interface/xenpmu.h>#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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |