From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2A6EC433EF for ; Thu, 16 Dec 2021 22:47:13 +0000 (UTC) Received: from localhost ([::1]:42998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxzWq-0001du-MS for qemu-devel@archiver.kernel.org; Thu, 16 Dec 2021 17:47:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxxlV-0006T4-EZ for qemu-devel@nongnu.org; Thu, 16 Dec 2021 15:54:13 -0500 Received: from [2a00:1450:4864:20::431] (port=42730 helo=mail-wr1-x431.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxxlT-0004ga-HE for qemu-devel@nongnu.org; Thu, 16 Dec 2021 15:54:13 -0500 Received: by mail-wr1-x431.google.com with SMTP id c4so245640wrd.9 for ; Thu, 16 Dec 2021 12:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i8F1tGHHJn/8X1S7A3mjlZad7t1hOk6jVyBEfW6QX30=; b=bSBo9uQOdv66yCjsYPPbohmbIb29usAtWCK6r6Cm7Hf2o3WaCS8LIupfhfbN7zFRQt uJ9icqb+F2c+rHjGNn770OKIcpC1mJ4lOy+HtnJI2rPEof2u6RaGzhCmsNnswDO8INkc gVNF0HpQVF0qM6MwnnRHMXz5P0YHv9whVD/dP1ocztTfedsunzbNteBVXwRLCvKxa3lQ DqhaJ6j1dQ2snnpQwFGXMh/pFLq7/9UYzPEJv14zpyIo3NNC1n7q2NTI+oXJwEOOyXT2 KHgot3rLdEGj+7kY3lGVupGNoqY28COyLZSDpNE5YWcH47xxEe9VYGDyv4x99LlPCBcx dd4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i8F1tGHHJn/8X1S7A3mjlZad7t1hOk6jVyBEfW6QX30=; b=0DrOJA0OJdT8xSv/v2juuW+wdaEPAOHOQn7WfF9i02qW8NRPI67puXlmaaUtzIbLYs IaW2RnvSKIuxH7HLauRxX7LRKef7XZQDWIVh5UOnPp5AEYD/O3M1bL7SrnHxFvqcu5qa qbREwQgx5o+ideAVwETpWE9LnRQrS3xcqYDPtKuR2WR+VNQuZOisCwdeyFAtJ+YV+eE2 EyS2W3iZlNYx56ma+DXoioJGfa+PBIJ7wNt5Trk+xQDiYDSU8Fhfb730DWPribvjMl7Z POqNGU515Bm6UiZfn9fnxzbxz+/+uSRgxfUrkDTsyWE6nxXbGx5FihNnV+NrLb8aZw97 dNjQ== X-Gm-Message-State: AOAM532gsHFVf2kzIFk1D9DJm/gJe7ELiAlWB8ocJzuVrnJX6rN9e8rZ tPvvEMPYXXJAwgw0LR41WQi7L86vxQQXeOjknGg= X-Google-Smtp-Source: ABdhPJyQBONS8ccc6AOV9xlFOcxR/wzkkgRbB+kR+/1XtyW+BPiMe5brhXH/RwfLecQ++s9mSUDYsYQ3qKyxTgZpDbA= X-Received: by 2002:a05:6000:18a3:: with SMTP id b3mr10917416wri.343.1639688047748; Thu, 16 Dec 2021 12:54:07 -0800 (PST) MIME-Version: 1.0 References: <20211009210838.2219430-1-marcandre.lureau@redhat.com> <20211013052214.stif2dodyueetm3p@sirius.home.kraxel.org> In-Reply-To: <20211013052214.stif2dodyueetm3p@sirius.home.kraxel.org> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Fri, 17 Dec 2021 00:53:55 +0400 Message-ID: Subject: Re: [PATCH v2 00/37] Add D-Bus display backend To: Gerd Hoffmann Content-Type: multipart/alternative; boundary="000000000000a0e77b05d3499f59" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::431 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=marcandre.lureau@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000a0e77b05d3499f59 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Wed, Oct 13, 2021 at 9:23 AM Gerd Hoffmann wrote: > On Sun, Oct 10, 2021 at 01:08:01AM +0400, marcandre.lureau@redhat.com > wrote: > > From: Marc-Andr=C3=A9 Lureau > > > > Hi, > > > > Both Spice and VNC are relatively complex and inefficient for local-onl= y > > display/console export. > > > > The goal of this display backend is to export over D-Bus an interface > close to > > the QEMU internal APIs. Any -display or -audio backend should be > possible to > > implement externally that way. It will allow third-parties to maintain > their own > > backends (UI toolkits, servers etc), and eventually reduce the > responsability on > > QEMU. > > > > D-Bus is the protocol of choice for the desktop, it has many convenient > bindings > > for various languages and tools. Data blob transfer is more efficient > than QMP > > too. Backends can come and go as needed: you can have several display > opened > > (say Boxes & virt-manager), while exporting the display over VNC for > example > > from a different process. It works best on Unix, but there is some > Windows > > support too (even Windows has some AF_UNIX nowadays, and the WSL2 > situation may > > change the future of QEMU on Windows anyway). > > > > Using it only requires "-display dbus" on any reasonable Linux desktop > with a > > D-Bus session bus. Then you use can use busctl, d-feet or gdbus, ex: > > $ gdbus introspect --session -r -d org.qemu -o / > > > > See the different patches and documentation for further options. The > p2p=3Don mode > > should also allow users running bus-less (on MacOS for ex). We can also > add TCP > > socket if needed (although more work would be needed in this case to > replace > > the FD-passing with some extra TCP listening socket). > > Wow. That series got a lot of fine tuning. The patches look all good > to me. > > Acked-by: Gerd Hoffmann > I have rebased the series and added your acked-by ( https://gitlab.com/marcandre.lureau/qemu/-/tree/dbus) The client side is still in development. However, the libvirt series is in shape ( https://patchew.org/Libvirt/20211202142411.1718032-1-marcandre.lureau@redha= t.com/), waiting for QEMU side to land. Should I make a PR or ask for more reviews? Since this is fairly long to review but quite independent from existing code, I think sending a PR is reasonable wdyt? > > A WIP Rust/Gtk4 client and VNC server is: > https://gitlab.com/marcandre.lureau/qemu-display/ > > (check README.md for details, then `cargo run` should connect to QEMU) > > Hmm, that wants rather cutting edge versions, stock Fedora 34 isn't new > enough to build it. And I don't feel like updating to Fedora 35 beta > for that. So unfortunately I couldn't easily test it, but I'd love to > see that live in action. > > Is it possible to keep the client running while starting and stopping > qemu (comparable to "virt-viewer --wait --reconnect" behaviour)? > > That's doable. I just added a --wait option to the demo client. For reconnect to work, we would need a better way to track name ownership changes (connection and disconnections) in zbus. I am working on it. thanks --=20 Marc-Andr=C3=A9 Lureau --000000000000a0e77b05d3499f59 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Wed, Oct 13, 2021 at 9:23 AM Ger= d Hoffmann <kraxe= l@redhat.com> wrote:
On Sun, Oct 10, 2021 at 01:08:01AM +0400, marcandre.lureau@redhat.com= wrote:
> From: Marc-Andr=C3=A9 Lureau <marcandre.lureau@redhat.com>
>
> Hi,
>
> Both Spice and VNC are relatively complex and inefficient for local-on= ly
> display/console export.
>
> The goal of this display backend is to export over D-Bus an interface = close to
> the QEMU internal APIs. Any -display or -audio backend should be possi= ble to
> implement externally that way. It will allow third-parties to maintain= their own
> backends (UI toolkits, servers etc), and eventually reduce the respons= ability on
> QEMU.
>
> D-Bus is the protocol of choice for the desktop, it has many convenien= t bindings
> for various languages and tools. Data blob transfer is more efficient = than QMP
> too. Backends can come and go as needed: you can have several display = opened
> (say Boxes & virt-manager), while exporting the display over VNC f= or example
> from a different process. It works best on Unix, but there is some Win= dows
> support too (even Windows has some AF_UNIX nowadays, and the WSL2 situ= ation may
> change the future of QEMU on Windows anyway).
>
> Using it only requires "-display dbus" on any reasonable Lin= ux desktop with a
> D-Bus session bus. Then you use can use busctl, d-feet or gdbus, ex: > $ gdbus introspect --session -r -d org.qemu -o /
>
> See the different patches and documentation for further options. The p= 2p=3Don mode
> should also allow users running bus-less (on MacOS for ex). We can als= o add TCP
> socket if needed (although more work would be needed in this case to r= eplace
> the FD-passing with some extra TCP listening socket).

Wow.=C2=A0 That series got a lot of fine tuning.=C2=A0 The patches look all= good
to me.

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

I hav= e rebased the series and added your acked-by (https://gitlab.com/ma= rcandre.lureau/qemu/-/tree/dbus)

The client si= de is still in development. However, the libvirt series is in shape (https://patchew.org/Libvirt/20211202142411.1= 718032-1-marcandre.lureau@redhat.com/), waiting for QEMU side to land.<= br>

Should I make a PR or ask for more reviews? Si= nce this is fairly long to review but quite independent from existing code,= I think sending a PR is reasonable wdyt?


> A WIP Rust/Gtk4 client and VNC server is: http= s://gitlab.com/marcandre.lureau/qemu-display/
> (check README.md for details, then `cargo run` should connect to QEMU)=

Hmm, that wants rather cutting edge versions, stock Fedora 34 isn't new=
enough to build it.=C2=A0 And I don't feel like updating to Fedora 35 b= eta
for that.=C2=A0 So unfortunately I couldn't easily test it, but I'd= love to
see that live in action.

Is it possible to keep the client running while starting and stopping
qemu (comparable to "virt-viewer --wait --reconnect" behaviour)?<= br clear=3D"all">

That's doable. I = just added a --wait option to the demo client.

For= reconnect to work, we would need a better way to track name ownership chan= ges (connection and disconnections) in zbus. I am working on it.
=
thanks

--
Marc-Andr=C3=A9 Lurea= u
--000000000000a0e77b05d3499f59--