xemu/hw/vfio
Shameer Kolothum 3b1b9aa4d5 vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path
When vfio_enable_vectors() returns with less than requested nr_vectors
we retry with what kernel reported back. But the retry path doesn't
call vfio_prepare_kvm_msi_virq_batch() and this results in,

qemu-system-aarch64: vfio: Error: Failed to enable 4 MSI vectors, retry with 1
qemu-system-aarch64: ../hw/vfio/pci.c:602: vfio_commit_kvm_msi_virq_batch: Assertion `vdev->defer_kvm_irq_routing' failed

Fixes: dc580d51f7 ("vfio: defer to commit kvm irq routing when enable msi/msix")
Reviewed-by: Longpeng <longpeng2@huawei.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
(cherry picked from commit c17408892319712c12357e5d1c6b305499c58c2a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-06-30 19:02:13 +03:00
..
amd-xgbe.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
ap.c target/s390x: move kvm files into kvm/ 2021-07-07 14:01:59 +02:00
calxeda-xgmac.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
ccw.c vfio-ccw: forward halt/clear errors 2021-09-06 16:22:54 +02:00
common.c vfio: move implement of vfio_get_xlat_addr() to memory.c 2022-11-07 14:08:17 -05:00
display.c ui/console: Do not return a value with ui_info 2022-06-14 10:34:37 +02:00
igd.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
Kconfig hw/vfio: Move the IGD quirk code to a separate file 2020-02-06 11:55:42 -07:00
meson.build vfio: Add migration region initialization and finalize function 2020-11-01 12:30:50 -07:00
migration.c vfio/migration: Fix wrong enum usage 2022-11-03 15:57:31 -06:00
pci-quirks.c hw/vfio/pci-quirks: Resolve redundant property getters 2022-05-24 10:38:50 +10:00
pci.c vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path 2023-06-30 19:02:13 +03:00
pci.h vfio: defer to commit kvm irq routing when enable msi/msix 2022-05-06 09:06:50 -06:00
platform.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
spapr.c Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
trace-events vfio/common: remove spurious warning on vfio_listener_region_del 2022-06-08 08:44:19 -06:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00