[Bug 201753] AMD-Vi: Unable to write to IOMMU perf counter

bugzilla-daemon
2021-02-27T15:22:21Z

--- Comment #17 from David Coe (david.coe@live.co.uk) ---
Again, good day!

Two re-builds using Alex's (one-line) patch, for kernels 5.8.18 and 5.10.11.
Both give on the Ryzen 2400G:

[ 0.374138] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 0.374141] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[ 0.375457] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4
counters/bank).
[ 0.626269] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>

I don't know how significant an extra 125 msec on boot time is but, on grounds
of simplicity and elegance, I'd vote for Alex :-). Are there any downsides?

Much appreciated all.

David