Skip to content

Commit 9387cf5

Browse files
rchatreawilliam
authored andcommitted
vfio/pci: Update stale comment
In preparation for surrounding code change it is helpful to ensure that existing comments are accurate. Remove inaccurate comment about direct access and update the rest of the comment to reflect the purpose of writing the cached MSI message to the device. Suggested-by: Alex Williamson <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Reinette Chatre <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/5b605ce7dcdab5a5dfef19cec4d73ae2fdad3ae1.1683740667.git.reinette.chatre@intel.com Signed-off-by: Alex Williamson <[email protected]>
1 parent 63972f6 commit 9387cf5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/vfio/pci/vfio_pci_intrs.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,9 @@ static int vfio_msi_set_vector_signal(struct vfio_pci_core_device *vdev,
428428
}
429429

430430
/*
431-
* The MSIx vector table resides in device memory which may be cleared
432-
* via backdoor resets. We don't allow direct access to the vector
433-
* table so even if a userspace driver attempts to save/restore around
434-
* such a reset it would be unsuccessful. To avoid this, restore the
435-
* cached value of the message prior to enabling.
431+
* If the vector was previously allocated, refresh the on-device
432+
* message data before enabling in case it had been cleared or
433+
* corrupted (e.g. due to backdoor resets) since writing.
436434
*/
437435
cmd = vfio_pci_memory_lock_and_enable(vdev);
438436
if (msix) {

0 commit comments

Comments
 (0)