On Thu, 12 Feb 2026 at 14:07, Ani Sinha <[email protected]> wrote:
> Maybe we could do something like this (I have not tested it) but perhaps 
> outside the scope of this change set:
>
> diff --git a/migration/migration.c b/migration/migration.c
> index b103a82fc0..7d85821315 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1696,8 +1696,11 @@ static int add_blockers(Error **reasonp, unsigned 
> modes, Error **errp)
>  {
>      for (MigMode mode = 0; mode < MIG_MODE__MAX; mode++) {
>          if (modes & BIT(mode)) {
> -            migration_blockers[mode] = 
> g_slist_prepend(migration_blockers[mode],
> -                                                       *reasonp);
> +            if (g_slist_index(migration_blockers[mode],
> +                                 *reasonp) == -1) {
> +                migration_blockers[mode] = 
> g_slist_prepend(migration_blockers[mode],
> +                                                           *reasonp);
> +            }
>          }
>      }
>      return 0;

* Yes, and when g_slist_index() returns >= 0,  return -1 OR an
indication that the blocker (address) already exists in the list. That
way other such instances where the same blocker is added multiple
times will be caught.

* But let's make it a separate patch. Restrict current patch to
removing add_clocker calls from sev_*_launch_finish() calls.

Thank you.
---
  - Prasad


Reply via email to