]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/pvrdma: Unregister from shutdown notifier when device goes down
authorYuval Shaia <yuval.shaia@oracle.com>
Mon, 11 Mar 2019 10:29:14 +0000 (03:29 -0700)
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Sat, 16 Mar 2019 13:52:44 +0000 (15:52 +0200)
This hook was installed to close the device when VM is going down.
After the device is closed there is no need to be informed on VM
shutdown.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <1552300155-25216-11-git-send-email-yuval.shaia@oracle.com>
Reviewed-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/rdma/vmw/pvrdma_main.c

index a4afceda1491d9cf5fadd91cb17d806c93279ea5..49bfbd6d41925ca3251eabd66e6ae363cdd59521 100644 (file)
@@ -311,6 +311,8 @@ static void pvrdma_fini(PCIDevice *pdev)
 {
     PVRDMADev *dev = PVRDMA_DEV(pdev);
 
+    notifier_remove(&dev->shutdown_notifier);
+
     pvrdma_qp_ops_fini();
 
     rdma_backend_stop(&dev->backend_dev);