qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] migration: failover: reset partially_hotplugged
@ 2021-06-29 15:29 Laurent Vivier
  2021-06-29 17:43 ` Juan Quintela
  2021-07-06  2:52 ` Jason Wang
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-06-29 15:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jason Wang, Jens Freimann, Michael S. Tsirkin, Juan Quintela

When the card is plugged back, reset the partially_hotplugged flag to false

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1787194
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 hw/net/virtio-net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index bd7958b9f0ee..16d20cdee52a 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -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);
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] migration: failover: reset partially_hotplugged
  2021-06-29 15:29 [PATCH] migration: failover: reset partially_hotplugged Laurent Vivier
@ 2021-06-29 17:43 ` Juan Quintela
  2021-07-06  2:52 ` Jason Wang
  1 sibling, 0 replies; 3+ messages in thread
From: Juan Quintela @ 2021-06-29 17:43 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: Jason Wang, Jens Freimann, qemu-devel, Michael S. Tsirkin

Laurent Vivier <lvivier@redhat.com> wrote:
> When the card is plugged back, reset the partially_hotplugged flag to false
>
> Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1787194
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  hw/net/virtio-net.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index bd7958b9f0ee..16d20cdee52a 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -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);

Reviewed-by: Juan Quintela <quintela@redhat.com>


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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] migration: failover: reset partially_hotplugged
  2021-06-29 15:29 [PATCH] migration: failover: reset partially_hotplugged Laurent Vivier
  2021-06-29 17:43 ` Juan Quintela
@ 2021-07-06  2:52 ` Jason Wang
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Wang @ 2021-07-06  2:52 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: Jens Freimann, Michael S. Tsirkin, Juan Quintela


在 2021/6/29 下午11:29, Laurent Vivier 写道:
> When the card is plugged back, reset the partially_hotplugged flag to false
>
> Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1787194
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>   hw/net/virtio-net.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index bd7958b9f0ee..16d20cdee52a 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -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);


Acked-by: Jason Wang <jasowang@redhat.com>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-06  2:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 15:29 [PATCH] migration: failover: reset partially_hotplugged Laurent Vivier
2021-06-29 17:43 ` Juan Quintela
2021-07-06  2:52 ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).