"Michael S. Tsirkin" <mst@xxxxxxxxxx> wrote: > When vhost-net is disabled on reboot, we set msix mask notifier > to NULL to disable further mask/unmask notifications. > Code currently tries to pass this NULL to notifier, > leading to a crash. The right thing to do is > to add explicit APIs to enable/disable notifications. > Now when disabling notifications: > - if vector is masked, we don't need to notify backend, > just disable future notifications > - if vector is unmasked, invoke callback to unassign backend, > then disable future notifications > > This patch also polls notifier before closing it, > to make sure we don't lose events if poll callback > didn't have time to run. > > Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> > --- > > Changes from v1: > Separate APIs to set and unset notifiers > Test and clear notifier before destroying it > > hw/msix.c | 40 +++++++++++++++++++++++++++++++++++----- > hw/msix.h | 1 + > hw/virtio-pci.c | 7 +++++-- > 3 files changed, 41 insertions(+), 7 deletions(-) Acked-by: Juan Quintela <quintela@xxxxxxxxxx> This patch addresses the issues that I pointed in previous mail and fixes the problem at hand. Creating a better API for interaction between virtio-pci <-> msix still needs more work/thought, already discussed that with mst. Later, Juan. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html