lkml.org 
[lkml]   [2023]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V4 07/11] vfio/pci: Update stale comment
From
Hi Kevin,

On 4/27/2023 11:42 PM, Tian, Kevin wrote:
>> From: Chatre, Reinette <reinette.chatre@intel.com>
>> Sent: Friday, April 28, 2023 1:36 AM
>>
>> @@ -419,11 +419,9 @@ static int vfio_msi_set_vector_signal(struct
>> vfio_pci_core_device *vdev,
>> }
>>
>> /*
>> - * The MSIx vector table resides in device memory which may be
>> cleared
>> - * via backdoor resets. We don't allow direct access to the vector
>> - * table so even if a userspace driver attempts to save/restore
>> around
>> - * such a reset it would be unsuccessful. To avoid this, restore the
>> - * cached value of the message prior to enabling.
>> + * If the vector was previously allocated, refresh the on-device
>> + * message data before enabling in case it had been cleared or
>> + * corrupted since writing.
>> */
>> cmd = vfio_pci_memory_lock_and_enable(vdev);
>> if (msix) {
>
> What about keeping backdoor reset as an example, e.g.
>
> "in case it had been cleared or corrupted (e.g. due to backdoor resets) ..."
>
> otherwise one may doubt whether it is a more severe problem causing
> the corruption inadvertently w/o userspace driver's awareness and then
> whether just restoring the data is sufficient to move on.

Will do. Thank you very much.

Reinette

\
 
 \ /
  Last update: 2023-04-28 20:25    [W:0.065 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site