@@ -480,19 +480,25 @@ int vfio_pci_core_enable(struct vfio_pci_core_device *vdev)
return ret;
}
- /* Don't allow our initial saved state to include busmaster */
- pci_clear_master(pdev);
+ if (!liveupdate) {
+ /* Don't allow our initial saved state to include busmaster */
+ pci_clear_master(pdev);
+ }
ret = pci_enable_device(pdev);
if (ret)
goto out_power;
- /* If reset fails because of the device lock, fail this path entirely */
- ret = pci_try_reset_function(pdev);
- if (ret == -EAGAIN)
- goto out_disable_device;
+ if (!liveupdate) {
+ /* If reset fails because of the device lock, fail this path entirely */
+ ret = pci_try_reset_function(pdev);
+ if (ret == -EAGAIN)
+ goto out_disable_device;
- vdev->reset_works = !ret;
+ vdev->reset_works = !ret;
+ } else {
+ vdev->reset_works = 1;
+ }
pci_save_state(pdev);
vdev->pci_saved_state = pci_store_saved_state(pdev);
if (!vdev->pci_saved_state)