All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: QEMU <qemu-devel@nongnu.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH v3 18/18] ui/vdagent: add a migration blocker
Date: Thu, 5 Aug 2021 18:57:46 +0400	[thread overview]
Message-ID: <CAJ+F1CJkDd+nvzP0vJn6GVZGBqg95eL-GDaUMb8yb7yBKB+M2g@mail.gmail.com> (raw)
In-Reply-To: <20210805135715.857938-19-marcandre.lureau@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2067 bytes --]

On Thu, Aug 5, 2021 at 6:06 PM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The current implementation lacks migration support. After migration,
> vdagent support will be broken (even after a restart of the daemons).
> Let's try to fix it in 6.2.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/vdagent.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/ui/vdagent.c b/ui/vdagent.c
> index 7d8cb963ff..603a2a7bd2 100644
> --- a/ui/vdagent.c
> +++ b/ui/vdagent.c
> @@ -6,6 +6,7 @@
>  #include "qemu/option.h"
>  #include "qemu/units.h"
>  #include "hw/qdev-core.h"
> +#include "migration/blocker.h"
>  #include "ui/clipboard.h"
>  #include "ui/console.h"
>  #include "ui/input.h"
> @@ -23,6 +24,9 @@
>  struct VDAgentChardev {
>      Chardev parent;
>
> +    /* TODO: migration isn't yet supported */
> +    Error *migration_blocker;
> +
>      /* config */
>      bool mouse;
>      bool clipboard;
> @@ -599,6 +603,10 @@ static void vdagent_chr_open(Chardev *chr,
>      return;
>  #endif
>
> +    if (migrate_add_blocker(vd->migration_blocker, errp) != 0) {
> +        return;
> +    }
> +
>      vd->mouse = VDAGENT_MOUSE_DEFAULT;
>      if (cfg->has_mouse) {
>          vd->mouse = cfg->mouse;
> @@ -832,6 +840,8 @@ static void vdagent_chr_init(Object *obj)
>      VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(obj);
>
>      buffer_init(&vd->outbuf, "vdagent-outbuf");
> +    error_setg(&vd->migration_blocker,
> +               "The vdagent chardev doesn't yet support migration");
>  }
>
>  static void vdagent_chr_fini(Object *obj)
> @@ -840,6 +850,7 @@ static void vdagent_chr_fini(Object *obj)
>
>
Missing
 +    migrate_del_blocker(vd->migration_blocker);

     vdagent_disconnect(vd);
>      buffer_free(&vd->outbuf);
> +    error_free(vd->migration_blocker);
>  }
>
>  static const TypeInfo vdagent_chr_type_info = {
> --
> 2.32.0.264.g75ae10bc75
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 3133 bytes --]

  reply	other threads:[~2021-08-05 14:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 13:56 [PATCH v3 00/18] Clipboard fixes (for 6.1?) marcandre.lureau
2021-08-05 13:56 ` [PATCH v3 01/18] ui/vdagent: fix leak on error path marcandre.lureau
2021-08-27 13:29   ` Philippe Mathieu-Daudé
2021-08-05 13:56 ` [PATCH v3 02/18] ui/vdagent: remove copy-pasta comment marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 03/18] ui/gtk-clipboard: use existing macros marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 04/18] ui/gtk-clipboard: fix clipboard enum typo marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 05/18] ui/clipboard: add helper to retrieve current clipboard marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 06/18] ui/clipboard: add qemu_clipboard_peer_owns() helper marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 07/18] ui/clipboard: add qemu_clipboard_peer_release() helper marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 08/18] ui/clipboard: release owned grabs on unregister marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 09/18] ui/vdagent: disconnect handlers and reset state on finalize marcandre.lureau
2021-08-27 13:33   ` Philippe Mathieu-Daudé
2021-08-05 13:57 ` [PATCH v3 10/18] ui/vdagent: reset outbuf on disconnect marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 11/18] ui/vdagent: split clipboard recv message handling marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 12/18] ui/vdagent: use qemu_clipboard_peer_release helper marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 13/18] ui/vdagent: use qemu_clipboard_info helper marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 14/18] ui/vdagent: send empty clipboard when unhandled marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 15/18] ui/gtk-clipboard: use qemu_clipboard_info helper marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 16/18] ui/vdagent: send release when no clipboard owner marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 17/18] ui/gtk-clipboard: emit release clipboard events marcandre.lureau
2021-08-05 13:57 ` [PATCH v3 18/18] ui/vdagent: add a migration blocker marcandre.lureau
2021-08-05 14:57   ` Marc-André Lureau [this message]
2021-08-27 13:21 ` [PATCH v3 00/18] Clipboard fixes (for 6.1?) Marc-André Lureau
2021-08-31 12:30   ` Gerd Hoffmann
2021-08-31 12:34     ` Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ+F1CJkDd+nvzP0vJn6GVZGBqg95eL-GDaUMb8yb7yBKB+M2g@mail.gmail.com \
    --to=marcandre.lureau@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.