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 920A827AF3; Wed, 13 Apr 2022 16:12:32 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 00B0027B64; Wed, 13 Apr 2022 16:12:29 +0000 (UTC) Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by atuin.qyliss.net (Postfix) with ESMTPS id 8CEFE27B63 for ; Wed, 13 Apr 2022 16:12:27 +0000 (UTC) Received: by mail-lj1-x230.google.com with SMTP id 15so2795698ljw.8 for ; Wed, 13 Apr 2022 09:12:27 -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=HV71G1QdWnnc9szRyjD7ZW5SzqkZw5m35Ldw+6huWuw=; b=RDPSG/Y6mn8NU2XFrELlLuFD0M88kYLPG8/GNWw+dGSsx+IBoO4rcDzhEl1UvEc/8c 9sX+gkJIa5xJQJTm6eAuROSQ5uC/1nXbC/AcfdtNBS+sYQ3WHFZtcYN60EfauutFF6w0 N3SRxMI3vX6wGT1hZ2DHIMIIR8TlRzPA2GFaIGkZiqNiPBkAjh5ble+DCt2epaKqwOzs lwlB7O8W/6b4pLLNWoK+xZWBkxQsaHTFkyd9+iu4tUBzzBIaNTvSqnq9fHFwfAAskTII 9M0OO3TWoHtTDIJ3kXX+pMqMDjujyiZ5wZazsU1c4hNw0pWFNWJh//3PJOup64tx9RYy rb/A== 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=HV71G1QdWnnc9szRyjD7ZW5SzqkZw5m35Ldw+6huWuw=; b=LABFURA5qNUDw4sSFTag1J0t3sF9aZ0ofThsntG353daOs+LQV2sqspQZQtQcclruS L4D9t/mJrtcupsO9W/a/KPjulaYEKLdZUWQV5h8XoV1VAqOjoKabmy71cCOFtDwtybuy QciknD23Jljkc9DlPs0izQLkYSeiJTX+6V5AVibW51w7oLKWZg8cgM7Tra72kV20Jz3j sqrtuk2WBHq4kdqgPX/5hJaKWL2zRVDMIo9xHkE7zXE+uFc5sjxaW1RXZ1aghjujpAtT iluznFzVOt353jg9zE94FR5GluFvai4lFInYl4ZOkgAO0XzOvwdwvsJyFlIlI5vEPsxQ r1/A== X-Gm-Message-State: AOAM532/B9AjEhPVFb5AqpTJT58lO3a7UnJIMyDjTkGJh6f/qQ8fQ21M 0K2tOPWl/g+GWABjEgg35hs+ovUMQzQ50N5BUv0= X-Google-Smtp-Source: ABdhPJyH7PxCDf2osCXixrKCv+GhStap2O5UF/bEJ502ZQnSqbYhmuFK06uGgTAXlodSFJ+c6ZM3nzRg8zZjruvE2JU= X-Received: by 2002:a2e:b8cd:0:b0:24b:4aa6:35c2 with SMTP id s13-20020a2eb8cd000000b0024b4aa635c2mr18657080ljp.82.1649866345984; Wed, 13 Apr 2022 09:12:25 -0700 (PDT) MIME-Version: 1.0 References: <87o871tqqu.fsf@alyssa.is> <87bl2sp3p3.fsf@alyssa.is> <20220315140604.ta433j557jsoknkv@eve> <20220315202339.6bqrzsf4yjkggbup@eve> <20220321160534.w4oifq3cdygrobrm@eve> <20220322111639.pvr5gxz6zmeu5oua@eve> In-Reply-To: From: Thomas Leonard Date: Wed, 13 Apr 2022 17:12:13 +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: FIXEWESVJ5FLYCCSFXACKB66T7V5DMZ3 X-Message-ID-Hash: FIXEWESVJ5FLYCCSFXACKB66T7V5DMZ3 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 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-spec.md I don't think it's possible to avoid races completely, but it seems to be working reasonably well so far. --=20 talex5 (GitHub/Twitter) http://roscidus.com/blog/