> From: Chatre, Reinette <reinette.chatre@xxxxxxxxx> > Sent: Friday, April 28, 2023 1:36 AM > > vfio_msi_disable() releases all previously allocated state > associated with each interrupt before disabling MSI/MSI-X. > > vfio_msi_disable() iterates twice over the interrupt state: > first directly with a for loop to do virqfd cleanup, followed > by another for loop within vfio_msi_set_block() that removes > the interrupt handler and its associated state using > vfio_msi_set_vector_signal(). > > Simplify interrupt cleanup by iterating over allocated interrupts > once. > > Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>