Re: [PATCH v3 11/18] dmaengine: idxd: ims setup for the vdcm

From: Dave Jiang
Date: Thu Oct 08 2020 - 12:51:51 EST




On 10/8/2020 12:39 AM, Thomas Gleixner wrote:
On Wed, Oct 07 2020 at 14:54, Dave Jiang wrote:
On 9/30/2020 12:57 PM, Thomas Gleixner wrote:
Aside of that this is fiddling in the IMS storage array behind the irq
chips back without any comment here and a big fat comment about the
shared usage of ims_slot::ctrl in the irq chip driver.

This is to program the pasid fields in the IMS table entry. Was
thinking the pasid fields may be considered device specific so didn't
attempt to add the support to the core code.

Well, the problem is that this is not really irq chip functionality.

But the PASID programming needs to touch the IMS storage which is also
touched by the irq chip.

This might be correct as is, but without a big fat comment explaining
WHY it is safe to do so without any form of serialization this is just
voodoo and unreviewable.

Can you please explain when the PASID is programmed and what the state
of the interrupt is at that point? Is this a one off setup operation or
does this happen dynamically at random points during runtime?

I will put in comments for the function to explain why and when we modify the pasid field for the IMS entry. Programming of the pasid is done right before we request irq. And the clearing is done after we free the irq. We will not be touching the IMS field at runtime. So the touching of the entry should be safe.


This needs to be clarified first.

Thanks,

tglx