[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] patch for restricted vPMU modes



>>> On 21.11.15 at 06:32, <bgregg@xxxxxxxxxxx> wrote:
> I've included the short patch below for Xen 4.6.0, which provides these
> modes (it also fixes a minor copy-and-paste error with
> core2_get_fixed_pmc_count(), which I believe was accessing the wrong
> register). I am not a veteran Xen programmer, so please feel free to edit
> or rewrite this patch. In case this email messes it up, it's also on:
> https://github.com/brendangregg/Misc/blob/master/xen/xen-4.6.0-vpmu-filter.d 
> iff

Thanks for the contribution, but I'm sorry - this is not how things work.
Unless someone else want to pick this up (and perhaps even then) the
patch lacks proper attributes (like a Signed-off-by tag), should be
against -unstable instead of any released version, and I don't think
anyone's going to go grab it from a web page to apply (i.e. if you
can't get your mail client to handle it properly when inlined, attach it
in addition to inlining).

See http://wiki.xenproject.org/wiki/Submitting_Xen_Project_Patches.

> --- xen-4.6.0-clean/xen/arch/x86/cpu/vpmu_intel.c 2015-10-05
> 07:33:39.000000000 -0700
> +++ xen-4.6.0-brendan/xen/arch/x86/cpu/vpmu_intel.c 2015-11-20
> 15:29:42.571781176 -0800
> @@ -166,10 +166,10 @@
>   */
>  static int core2_get_fixed_pmc_count(void)
>  {
> -    u32 eax;
> +    u32 edx;
> 
> -    eax = cpuid_eax(0xa);
> -    return MASK_EXTR(eax, PMU_FIXED_NR_MASK);
> +    edx = cpuid_edx(0xa);
> +    return MASK_EXTR(edx, PMU_FIXED_NR_MASK);
>  }

Without going into much detail on the actual patch, this caught my
eye: Either you're fixing a pretty blatant bug here, or this change
just can't be right. In the former case, such a fix should be
submitted as a separate patch.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.