From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id BA0AB24958; Tue, 19 Apr 2022 11:58:35 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id DB9EE249AE; Tue, 19 Apr 2022 11:58:32 +0000 (UTC) Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by atuin.qyliss.net (Postfix) with ESMTPS id 482D124952 for ; Tue, 19 Apr 2022 11:58:30 +0000 (UTC) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-d39f741ba0so17138673fac.13 for ; Tue, 19 Apr 2022 04:58:30 -0700 (PDT) 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:content-transfer-encoding; bh=s6cvkfzCMOM+H7H5BgXGxxOFujW1PqRZEBEwNDoa6aU=; b=obCgaXmirDjbNVM931ExB3q6OZDgWWQODzeghhZGiKAkWvb9IPSEVN6JB5wbiTkmDp PEHZPZil3xU8suP33+NWiNs6ElaxtvW/LXbDnpfz46NZ/uQBxItTVpg/hBP9wAhbugbu VtK+f2RZIloKPNN/+kybh/k/wcTgHX6EO9ifmOkJ79w3IlDshZwEziHQGRvdQHcv0Sgl ACm59eUW8TXBka7FaWMYplmfKKrPO96/x6YzsY4gQ/kVZVlvVi8WI89MoNIBtwCzIWAD pMnN8cZx4wcphrQezEVd/C3eI5/8MBGL9tnDbveGD6UQFyU664q3IWSJ3x9aj+roVtkQ HsMA== 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:content-transfer-encoding; bh=s6cvkfzCMOM+H7H5BgXGxxOFujW1PqRZEBEwNDoa6aU=; b=64N9thHuXppEIhIngnMW4oxBYi8Fv+lXJZ4Yeqe6Kr/jn5G3SXGVcfZVYeJtjso9h2 PFVdS97gYw8N1bb1velRqNGFrRPcWIdNMCVLnSA8QnVgJL1aMkc+jBk6JBKVsUqlfb40 ylpUomEyiBSPgqwp2b2AV3bc5y4TdDqiLxKcgPmbyiOqU1tTswoTtm8Jka6CXGmo0dC6 SUZPTb4ZUhaiVxy5SChQ31tloqUw3/+354Xb2+xXX3cjZUFGxZv8o9euW1/v4UViRtKp Y3E5dyrwYFrKZNP6kHw5lUJfK+c2trc4QhD4olZWALGYj9ezZGGQ0KjVogLqK+l1ad4s 8KKQ== X-Gm-Message-State: AOAM531pXELr//tX+u8MVJtwzFl9u//j+Aq2s5/rEJK4BLsjEU7kHzpu JDkwIWxZcbVsbz5otA4XOXmBsS2gcS4CToe+BKcJUzaK X-Google-Smtp-Source: ABdhPJwJdOR9gFChHFzSD0lXTmclNrzqCWqHUT2L7eQJYQZzdDtvzYXHJGmcfcUJ767vIQFSXKA0oRWPeKZ1gB27OYs= X-Received: by 2002:a05:6870:538d:b0:de:aa91:898e with SMTP id h13-20020a056870538d00b000deaa91898emr6112325oan.54.1650369507598; Tue, 19 Apr 2022 04:58:27 -0700 (PDT) MIME-Version: 1.0 References: <20220315140604.ta433j557jsoknkv@eve> <20220315202339.6bqrzsf4yjkggbup@eve> <20220321160534.w4oifq3cdygrobrm@eve> <20220322111639.pvr5gxz6zmeu5oua@eve> <20220414135737.lvfbrch34kjojn3s@eve> In-Reply-To: <20220414135737.lvfbrch34kjojn3s@eve> From: Thomas Leonard Date: Tue, 19 Apr 2022 12:58:15 +0000 Message-ID: Subject: Re: Using virtio-gpu instead of virtwl To: Alyssa Ross Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3XT54NYDNVOUKY7UFZXFQIAN4CYWKB7P X-Message-ID-Hash: 3XT54NYDNVOUKY7UFZXFQIAN4CYWKB7P X-MailFrom: talex5@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-discuss.spectrum-os.org-0; header-match-discuss.spectrum-os.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: discuss@spectrum-os.org X-Mailman-Version: 3.3.5 Precedence: list List-Id: General high-level discussion about Spectrum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 14 Apr 2022 at 13:57, Alyssa Ross wrote: > > On Wed, Apr 13, 2022 at 05:12:13PM +0000, Thomas Leonard wrote: > > On Wed, 6 Apr 2022 at 12:19, Thomas Leonard wrote: > > [ converting from virtwl to virtio-gpu ] > > > I tried, but failed, to figure out the protocol. I did manage to get = a > > > test application showing a little animation, but it crashes after a > > > few seconds. > > > > OK, I found a solution to this: you can just open the device file > > twice and use one instance for Wayland messages and the other for > > allocating images. This avoids the first race. With that, I got the > > proxy converted: > > > > https://github.com/talex5/wayland-proxy-virtwl/pull/28 > > > > Though I'm not sure it's an improvement: +1,819 =E2=88=92577 lines! > > > > Instructions for configuring crosvm to use it: > > > > https://github.com/talex5/wayland-proxy-virtwl#virtio-gpu-support > > > > And I wrote up my guesses about the protocol here: > > > > https://github.com/talex5/wayland-proxy-virtwl/blob/master/virtio-spe= c.md > > That's extremely helpful, thanks for writing it up! > > > I don't think it's possible to avoid races completely, but it seems to > > be working reasonably well so far. > > I wonder if it would be worth asking about the remaining problems on the > relevant kernel mailing lists, since they sound like protocol issues > rather than anything specific to your implementation. The kernel isn't involved in any of the problems - it just relays opaque messages between the host and the guest. So probably crosvm/sommelier will sort things out by themselves after a while (and I'll need to update the proxy when that happens). > I tracked down the series where they were added[1], perhaps the > From/To/Cc in that posting would be a good starting point? > > If you do reach out, please CC me (and this list, if you want)! > > [1]: https://lore.kernel.org/dri-devel/20210921232024.817-1-gurchetansing= h@chromium.org/ --=20 talex5 (GitHub/Twitter) http://roscidus.com/blog/