AlexanderHello. Can you give any update please?
On 6/1/20 4:01 PM, Alexander Monakov wrote:
On Mon, 1 Jun 2020, Suravee Suthikulpanit wrote:Instead of blindly moving the code around to a spot that would just work,
No, this doesn't work, as I already said in the paragraph you are respondingMoving init_iommu_perf_ctr just after iommu_flush_all_caches resolvesAccording to your description, it should just need to be anywhere after
the issue. This is the earliest point in amd_iommu_init_pci where the
call succeeds on my laptop.
the
pci_enable_device() is called for the IOMMU device, isn't it? So, on your
system, what if we just move the init_iommu_perf_ctr() here:
to. See my last sentence in the quoted part.
So the implication is init_device_table_dma together with subsequent cache
flush is also setting up something that is necessary for counters to be
writable.
Alexander
I am trying to understand what might be required here. In this case,
the init_device_table_dma()should not be needed. I suspect it's the IOMMU
invalidate all command that's also needed here.
I'm also checking with the HW and BIOS team. Meanwhile, could you please give
the following change a try:
Alexander