> > /*
> > * VFIO_PAMU_MAP_MSI_BANK
> > *
> > * Maps the MSI bank at the specified index and iova. User space
must
> > * call this ioctl once for each MSI bank (count of banks is
returned by
> > * VFIO_IOMMU_GET_MSI_BANK_COUNT).
> > * Caller provides struct vfio_pamu_msi_bank_map with all fields
set.
> > * Operates on VFIO file descriptor (/dev/vfio/vfio).
> > * Return: 0 on success, -errno on failure
> > */
> >
> > struct vfio_pamu_msi_bank_map {
> > __u32 argsz;
> > __u32 msi_bank_index; /* the index of the MSI bank */
> > __u64 iova; /* the iova the bank is to be mapped
to */
> > };
>
> Again, flags. If we dynamically add or remove devices from a
container
> the bank count can change, right? If bank count goes from 2 to 3,
does
> userspace know assume the new bank is [2]? If bank count goes from
3 to
> 2, which index was that? If removing a device removes an MSI bank
then
> vfio-pamu will automatically do the unmap, right?
My assumption is that the bank count returned by
VFIO_IOMMU_GET_MSI_BANK_COUNT
is the max bank count for a platform. (number will mostly likely
always be
3 or 4). So it won't change as devices are added or removed.