migration: failover: reset partially_hotplugged
PATCH 1/1 migration: failover: reset partially_hotplugged
When the card is plugged back, reset the partially_hotplugged flag to false
--- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+)
hw/net/virtio-net.c +1 -0
@@ -3234,6 +3234,7 @@ static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, }hotplug_handler_plug (hotplug_ctrl, dev, &err); } + pdev->partially_hotplugged = false; out:error_propagate (errp, err);
Signature · 1 line
2.31.1
Quoted 13 lines · Laurent Vivier
When the card is plugged back, reset the
partially_hotpluggedflag to falseSigned-off-by Laurent Vivier <[email protected]>--- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+)hw/net/virtio-net.c +0
-0
hw/net/virtio-net.c static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, · line 3240
Quoted 7 lines
hw/net/virtio-net.c +1
-0@@ -3234,6 +3234,7 @@ static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, }hotplug_handler_plug (hotplug_ctrl, dev, &err); } + pdev->partially_hotplugged = false; out:error_propagate (errp, err);
But while we are at this:
- In case hotplug_handler_pre_plug() fails, we don't reset it. No, I have no clue what is the right thing to in that error case. We have already plugged it once, so it should work (famous last words).
- Independent of this patch, we check if hotplug_ctrl is NULL, but nothing else on the tree check for that.
Ok, device_set_realize() check it, but nothing else, except network failover. I can't see how we are going to be able to arrive there and not having it, though.
Later, Juan.
Quoted 13 lines · Laurent Vivier
When the card is plugged back, reset the
partially_hotpluggedflag to falseSigned-off-by Laurent Vivier <[email protected]>--- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+)hw/net/virtio-net.c +0
-0
hw/net/virtio-net.c static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, · line 3240
Quoted 7 lines
hw/net/virtio-net.c +1
-0@@ -3234,6 +3234,7 @@ static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, }hotplug_handler_plug (hotplug_ctrl, dev, &err); } + pdev->partially_hotplugged = false; out:error_propagate (errp, err);