diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2023-05-11 08:44:34 -0700 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2023-05-23 15:49:03 -0600 |
commit | 9387cf59dc6f987db875148dd596c45bc60813f8 (patch) | |
tree | 5f7998aca388356993637ce1e77f7c022817eb89 | |
parent | 63972f63a63f9c3b113cac34dc8692a7c9ae671d (diff) | |
download | linux-9387cf59dc6f987db875148dd596c45bc60813f8.tar.gz linux-9387cf59dc6f987db875148dd596c45bc60813f8.tar.bz2 linux-9387cf59dc6f987db875148dd596c45bc60813f8.zip |
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 <alex.williamson@redhat.com>
Link: https://lore.kernel.org/lkml/20230330164050.0069e2a5.alex.williamson@redhat.com/
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/5b605ce7dcdab5a5dfef19cec4d73ae2fdad3ae1.1683740667.git.reinette.chatre@intel.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
-rw-r--r-- | drivers/vfio/pci/vfio_pci_intrs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index e40eca69a293..867327e159c1 100644 --- a/drivers/vfio/pci/vfio_pci_intrs.c +++ b/drivers/vfio/pci/vfio_pci_intrs.c @@ -428,11 +428,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 (e.g. due to backdoor resets) since writing. */ cmd = vfio_pci_memory_lock_and_enable(vdev); if (msix) { |