[Qemu-devel] [PATCH v6 10/11] hw/pvrdma: Unregister from shutdown notifier when device goes down

Yuval Shaia posted 11 patches 6 years, 11 months ago
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yuval Shaia <yuval.shaia@oracle.com>
[Qemu-devel] [PATCH v6 10/11] hw/pvrdma: Unregister from shutdown notifier when device goes down
Posted by Yuval Shaia 6 years, 11 months ago
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>
---
 hw/rdma/vmw/pvrdma_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
index a4afced..49bfbd6 100644
--- a/hw/rdma/vmw/pvrdma_main.c
+++ b/hw/rdma/vmw/pvrdma_main.c
@@ -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);
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH v6 10/11] hw/pvrdma: Unregister from shutdown notifier when device goes down
Posted by Kamal Heib 6 years, 11 months ago

On 3/11/19 12:29 PM, Yuval Shaia wrote:
> 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>
> ---
>  hw/rdma/vmw/pvrdma_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
> index a4afced..49bfbd6 100644
> --- a/hw/rdma/vmw/pvrdma_main.c
> +++ b/hw/rdma/vmw/pvrdma_main.c
> @@ -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);
> 

Reviewed-by: Kamal Heib <kamalheib1@gmail.com>