From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 201753] AMD-Vi: Unable to write to IOMMU perf counter
Date: Sun, 28 Feb 2021 20:04:13 +0000 [thread overview]
Message-ID: <bug-201753-28872-cKEjkvjTn4@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 #18 from Paul Menzel (pmenzel+bugzilla.kernel.org@molgen.mpg.de) ---
Even with ten tries in the loop, it still fails with the AMD Ryzen 3 2200G with
Radeon Vega Graphics (family: 0x17, model: 0x11, stepping: 0x0):
[ 0.401152] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf
counter. (retry = 0)
```
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 9126efcbaf2c7..70c00ee5ff354 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -1746,7 +1746,7 @@ static void __init init_iommu_perf_ctr(struct amd_iommu
*iommu)
/* Check if the performance counters can be written to */
val = 0xabcd;
- for (retry = 5; retry; retry--) {
+ for (retry = 10; retry; retry--) {
if (iommu_pc_get_set_reg(iommu, 0, 0, 0, &val, true) ||
iommu_pc_get_set_reg(iommu, 0, 0, 0, &val2, false) ||
val2)
@@ -1764,7 +1764,7 @@ static void __init init_iommu_perf_ctr(struct amd_iommu
*iommu)
if (val != val2)
goto pc_false;
- pci_info(pdev, "IOMMU performance counters supported\n");
+ pci_info(pdev, "IOMMU performance counters supported (retry = %i)\n",
retry);
val = readl(iommu->mmio_base + MMIO_CNTR_CONF_OFFSET);
iommu->max_banks = (u8) ((val >> 12) & 0x3f);
@@ -1773,7 +1773,7 @@ static void __init init_iommu_perf_ctr(struct amd_iommu
*iommu)
return;
pc_false:
- pci_err(pdev, "Unable to read/write to IOMMU perf counter.\n");
+ pci_err(pdev, "Unable to read/write to IOMMU perf counter. (retry =
%i)\n", retry);
amd_iommu_pc_present = false;
return;
}
```
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2021-02-28 20:04 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 [this message]
2021-03-03 18:24 ` bugzilla-daemon
2021-03-05 10:26 ` bugzilla-daemon
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-cKEjkvjTn4@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 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).