Re: [patch 3/8] PCI/MSI: Enforce that MSI-X table entry is masked for update

From: Thomas Gleixner
Date: Thu Jul 22 2021 - 00:02:01 EST


Ashok,

On Wed, Jul 21 2021 at 15:32, Ashok Raj wrote:
> On Wed, Jul 21, 2021 at 09:11:29PM +0200, Thomas Gleixner wrote:
>> + /*
>> + * The specification mandates that the entry is masked
>> + * when the message is modified:
>> + *
>> + * "If software changes the Address or Data value of an
>> + * entry while the entry is unmasked, the result is
>> + * undefined."
>> + */
>> + if (unmasked)
>> + __pci_msix_desc_mask_irq(entry, PCI_MSIX_ENTRY_CTRL_MASKBIT);
>> +
>
> Is there any locking needs here? say during cpu hotplug and some user-space
> setting affinity?

No. Except for suspend/resume this is always serialized by irq_desc::lock().

Thanks,

tglx