All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 201753] AMD-Vi: Unable to write to IOMMU perf counter
Date: Fri, 05 Mar 2021 10:26:33 +0000	[thread overview]
Message-ID: <bug-201753-28872-2gHp1459Tk@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-201753-28872@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=201753

--- Comment #20 from David Coe (david.coe@live.co.uk) ---
More results and some progress!!

A. Alex Hung (Ubuntu) has cherry-picked the kernel-commit [1} of Suravee's
version 3 patch and placed test-builds on [2]. It works for his Ryzen 2500U. 
Bravo for a quick take-up!

I've checked it out and (alas, as expected with the original 5 x 20 msec delay)
it is isn't enough for my Ryzen 2400G which needs ~120 msecs to respond :-(.

B. I've done a couple more rebuilds for the current kernels on Ubuntu 20.10 and
21.04 using Suravee's patch updated both with Pauls' retry-logging and with
increasing the maximum delay to 25 x 20 msec.

Grepp'ing dmesg for IOMMU (on my 2400g) gives:

[    1.018329] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
(retry = 19)
[    1.022185] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[    1.023669] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4
counters/bank).
[    1.283218] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>

The retrys count backwards so that confirms the Ryzen 2500G still needs 120
msecs to respond.

My (very strong) proposal is that we increase Suravee's retry-count to
something large enough to cover the numerous entry-level Ryzen's out there.
Only the absolutely necessary boot-up delay is introduced (and checked, if
required, by Paul's logging statement). Most purchasers of Ryzen CPUs are then
covered! Only the dyed-in-the-wool speed-merchants have to make a choice
between boot-up time and IOMMU capability - at least until the underlying
problem can be corrected in firmware or silicon.

Thanks again, good people.

David

[1].
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6778ff5b21bd8e78c8bd547fd66437cf2657fd9b
[2]. https://people.canonical.com/~alexhung/LP1917203/

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2021-03-05 10:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-201753-28872@https.bugzilla.kernel.org/>
2020-03-27 20:58 ` [Bug 201753] AMD-Vi: Unable to write to IOMMU perf counter bugzilla-daemon
2020-03-27 21:06 ` bugzilla-daemon
2021-02-02  1:33 ` bugzilla-daemon
2021-02-06  3:42 ` bugzilla-daemon
2021-02-06  4:01 ` bugzilla-daemon
2021-02-10 19:52 ` bugzilla-daemon
2021-02-10 19:54 ` bugzilla-daemon
2021-02-11 18:03 ` bugzilla-daemon
2021-02-24 20:32 ` bugzilla-daemon
2021-02-25 17:54 ` bugzilla-daemon
2021-02-26 11:58 ` bugzilla-daemon
2021-02-26 13:28 ` bugzilla-daemon
2021-02-26 21:17 ` bugzilla-daemon
2021-02-27 15:21 ` bugzilla-daemon
2021-02-28 20:04 ` bugzilla-daemon
2021-03-03 18:24 ` bugzilla-daemon
2021-03-05 10:26 ` bugzilla-daemon [this message]
2021-03-08 10:46 ` bugzilla-daemon
2021-03-15 22:00 ` bugzilla-daemon
2021-03-16 11:14 ` bugzilla-daemon
2021-03-17 10:32 ` bugzilla-daemon
2021-03-18  1:22 ` bugzilla-daemon
2021-03-18  8:41 ` bugzilla-daemon
2021-03-18 16:41 ` bugzilla-daemon
2021-03-19  9:13 ` bugzilla-daemon
2021-03-19  9:56 ` bugzilla-daemon
2021-03-19 16:37 ` bugzilla-daemon
2021-03-19 20:43 ` bugzilla-daemon
2021-03-25 21:51 ` bugzilla-daemon
2021-08-26  8:42 ` bugzilla-daemon
2021-08-26  8:43 ` bugzilla-daemon
2021-10-01 19:54 ` bugzilla-daemon

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=bug-201753-28872-2gHp1459Tk@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.