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

Re: [Xen-devel] [PATCH v2 2/3] x86/VPMU: No need to check whether VPMU quirk is needed on Intel



> From: Boris Ostrovsky [mailto:boris.ostrovsky@xxxxxxxxxx]
> Sent: Wednesday, December 02, 2015 12:50 AM
> 
> We only support family 6 so quirk handling is always needed.

what about you adding other family support in the future then you'll
add back below quirk check?

> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> ---
>  xen/arch/x86/cpu/vpmu_intel.c | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
> 
> diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c
> index a267a3c..86d390f 100644
> --- a/xen/arch/x86/cpu/vpmu_intel.c
> +++ b/xen/arch/x86/cpu/vpmu_intel.c
> @@ -106,24 +106,11 @@ static const unsigned int regs_off =
>   * 1 (or another value != 0) into it.
>   * There exist no errata and the real cause of this behaviour is unknown.
>   */
> -bool_t __read_mostly is_pmc_quirk;
> -
> -static void check_pmc_quirk(void)
> -{
> -    if ( current_cpu_data.x86 == 6 )
> -        is_pmc_quirk = 1;
> -    else
> -        is_pmc_quirk = 0;
> -}
> -
>  static void handle_pmc_quirk(u64 msr_content)
>  {
>      int i;
>      u64 val;
> 
> -    if ( !is_pmc_quirk )
> -        return;
> -
>      val = msr_content;
>      for ( i = 0; i < arch_pmc_cnt; i++ )
>      {
> @@ -812,8 +799,7 @@ static int core2_vpmu_do_interrupt(struct cpu_user_regs 
> *regs)
>      rdmsrl(MSR_CORE_PERF_GLOBAL_STATUS, msr_content);
>      if ( msr_content )
>      {
> -        if ( is_pmc_quirk )
> -            handle_pmc_quirk(msr_content);
> +        handle_pmc_quirk(msr_content);
>          core2_vpmu_cxt->global_status |= msr_content;
>          msr_content = 0xC000000700000000 | ((1 << arch_pmc_cnt) - 1);
>          wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, msr_content);
> @@ -998,8 +984,6 @@ int __init core2_vpmu_init(void)
>                sizeof(uint64_t) * fixed_pmc_cnt +
>                sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt;
> 
> -    check_pmc_quirk();
> -
>      if ( sizeof(struct xen_pmu_data) + sizeof(uint64_t) * fixed_pmc_cnt +
>           sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt > PAGE_SIZE )
>      {
> --
> 1.8.1.4


_______________________________________________
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®.