iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Monakov <amonakov@ispras.ru>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	David Coe <david.coe@live.co.uk>,
	iommu@lists.linux-foundation.org,
	Shuah Khan <skhan@linuxfoundation.org>,
	Tj <ml.linux@elloe.vision>
Subject: Re: [PATCH] Revert "iommu/amd: Fix performance counter initialization"
Date: Wed, 3 Mar 2021 17:10:56 +0300 (MSK)	[thread overview]
Message-ID: <alpine.LNX.2.20.13.2103031648190.15170@monopod.intra.ispras.ru> (raw)
In-Reply-To: <a803de32-eec8-a0b1-69e6-43259ba5c656@amd.com>

On Wed, 3 Mar 2021, Suravee Suthikulpanit wrote:

> > Additionally, alternative proposed solutions [1] were not considered or
> > discussed.
> > 
> > [1]:https://lore.kernel.org/linux-iommu/alpine.LNX.2.20.13.2006030935570.3181@monopod.intra.ispras.ru/
> 
> This check has been introduced early on to detect a HW issue for
> certain platforms in the past, where the performance counters are not
> accessible and would result in silent failure when try to use the
> counters. This is considered legacy code, and can be removed if we
> decide to no longer provide sanity check for such case.

Which platforms? There is no such information in the code or the commit
messages that introduced this.

According to AMD's documentation, presence of performance counters is
indicated by "PCSup" bit in the "EFR" register. I don't think the driver
should second-guess that. If there were platforms where the CPU or the
firmware lied to the OS (EFR[PCSup] was 1, but counters were not present),
I think that should have been handled in a more explicit manner, e.g.
via matching broken CPUs by cpuid.

Alexander
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2021-03-03 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 12:11 [PATCH] Revert "iommu/amd: Fix performance counter initialization" Paul Menzel
2021-03-03 13:25 ` Suravee Suthikulpanit
2021-03-03 14:10   ` Alexander Monakov [this message]
2021-03-18  9:20     ` Paul Menzel
2021-04-07 10:04       ` Joerg Roedel

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=alpine.LNX.2.20.13.2103031648190.15170@monopod.intra.ispras.ru \
    --to=amonakov@ispras.ru \
    --cc=david.coe@live.co.uk \
    --cc=iommu@lists.linux-foundation.org \
    --cc=ml.linux@elloe.vision \
    --cc=pmenzel@molgen.mpg.de \
    --cc=skhan@linuxfoundation.org \
    --cc=suravee.suthikulpanit@amd.com \
    /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).