pds_vdpa: alloc irq vectors on DRIVER_OK
authorAllen Hubbe <allen.hubbe@amd.com>
Tue, 11 Jul 2023 04:24:36 +0000 (21:24 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 10 Aug 2023 19:51:45 +0000 (15:51 -0400)
commitc0a6c5cbf1a9e49357e942ed393da08a55808a49
tree64256532865f281844ddef7e1c492734880868e8
parented88863040daad18d3f9b12f7c9c1c3da3731e1f
pds_vdpa: alloc irq vectors on DRIVER_OK

We were allocating irq vectors at the time the aux dev was probed,
but that is before the PCI VF is assigned to a separate iommu domain
by vhost_vdpa.  Because vhost_vdpa later changes the iommu domain the
interrupts do not work.

Instead, we can allocate the irq vectors later when we see DRIVER_OK and
know that the reassignment of the PCI VF to an iommu domain has already
happened.

Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces")
Signed-off-by: Allen Hubbe <allen.hubbe@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230711042437.69381-5-shannon.nelson@amd.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/pds/vdpa_dev.c