RE: [PATCH V5 03/11] vfio/pci: Prepare for dynamic interrupt context storage

From: Tian, Kevin
Date: Tue May 16 2023 - 22:12:10 EST


> From: Chatre, Reinette <reinette.chatre@xxxxxxxxx>
> Sent: Thursday, May 11, 2023 11:45 PM
>
> Interrupt context storage is statically allocated at the time
> interrupts are allocated. Following allocation, the interrupt
> context is managed by directly accessing the elements of the
> array using the vector as index.
>
> It is possible to allocate additional MSI-X vectors after
> MSI-X has been enabled. Dynamic storage of interrupt context
> is needed to support adding new MSI-X vectors after initial
> allocation.
>
> Replace direct access of array elements with pointers to the
> array elements. Doing so reduces impact of moving to a new data
> structure. Move interactions with the array to helpers to
> mostly contain changes needed to transition to a dynamic
> data structure.
>
> No functional change intended.
>
> Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>