xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: George Dunlap <george.dunlap@eu.citrix.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Konrad Wilk <konrad.wilk@oracle.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, xen-devel@lists.xen.org
Subject: Re: [PATCH] perf: Check all MSRs before passing hw check
Date: Mon, 18 Mar 2013 09:42:42 +0100	[thread overview]
Message-ID: <20130318084242.GB17959@gmail.com> (raw)
In-Reply-To: <1363350033-16379-1-git-send-email-george.dunlap@eu.citrix.com>


* George Dunlap <george.dunlap@eu.citrix.com> wrote:

> check_hw_exists has a number of checks which go to two exit paths:
> msr_fail and bios_fail.  Checks classified as msr_fail will cause
> check_hw_exists() to return false, causing the PMU not to be used;
> bios_fail checks will only cause a warning to be printed, but will
> return true.
> 
> The problem is that if there are both msr failures and bios failures,
> and the routine hits a bios_fail check first, it will exit early and
> return true, not finishing the rest of the msr checks.  If those msrs
> are in fact broken, it will cause them to be used erroneously.
> 
> This changset causes check_hw_exists() to go through all of the msr
> checks, failing and returning false if any of them fail.
> 
> This problem affects kernels as far back as 3.2, and should thus be
> considered for backport.
> 
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
> CC: Konrad Wilk <konrad.wilk@oracle.com>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: "H. Peter Anvin" <hpa@zytor.com>
> CC: x86@kernel.org
> ---
>  arch/x86/kernel/cpu/perf_event.c |   20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

What is missing is a description of what specific platform this gets 
triggered on and exactly why. Is some hw feature emulation missing that 
causes the check to fail?

Thanks,

	Ingo

  parent reply	other threads:[~2013-03-18  8:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 12:20 [PATCH] perf: Check all MSRs before passing hw check George Dunlap
2013-03-15 12:50 ` Jan Beulich
2013-03-15 14:43   ` George Dunlap
2013-03-15 15:25     ` Jan Beulich
2013-03-18  8:42 ` Ingo Molnar [this message]
2013-03-18 10:40   ` George Dunlap
2013-03-18 10:53     ` Ingo Molnar
2013-03-18 10:55       ` George Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130318084242.GB17959@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=george.dunlap@eu.citrix.com \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).