diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2020-01-07 11:09:54 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-01-07 11:09:54 +0000 |
| commit | a8f2c60cef0ab7548e8160437546f24c2ce5cf9e (patch) | |
| tree | 3aecedf05e8348b6da8d9c7570f892ff386ed4c9 | |
| parent | cdbc5c51c8755e4e9ce964fc92ba755e1c71a914 (diff) | |
| parent | 0446f8121723b134ca1d1ed0b73e96d4a0a8689d (diff) | |
| download | focaccia-qemu-a8f2c60cef0ab7548e8160437546f24c2ce5cf9e.tar.gz focaccia-qemu-a8f2c60cef0ab7548e8160437546f24c2ce5cf9e.zip | |
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-fixes-20200106.0' into staging
VFIO fixes 2020-01-06 - Fix irqchip notifier de-registration if not registered (Peter Xu) # gpg: Signature made Mon 06 Jan 2020 21:58:17 GMT # gpg: using RSA key 239B9B6E3BB08B22 # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full] # gpg: aka "Alex Williamson <alex@shazbot.org>" [full] # gpg: aka "Alex Williamson <alwillia@redhat.com>" [full] # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" [full] # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * remotes/awilliam/tags/vfio-fixes-20200106.0: vfio/pci: Don't remove irqchip notifier if not registered Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | hw/vfio/pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 2d40b396f2..337a173ce7 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3076,7 +3076,9 @@ static void vfio_exitfn(PCIDevice *pdev) vfio_unregister_req_notifier(vdev); vfio_unregister_err_notifier(vdev); pci_device_set_intx_routing_notifier(&vdev->pdev, NULL); - kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier); + if (vdev->irqchip_change_notifier.notify) { + kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier); + } vfio_disable_interrupts(vdev); if (vdev->intx.mmap_timer) { timer_free(vdev->intx.mmap_timer); |