general high-level discussion about spectrum
 help / color / mirror / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: Thomas Leonard <talex5@gmail.com>
Cc: Puck Meerburg <puck@puckipedia.com>, discuss@spectrum-os.org
Subject: Re: Using virtio-gpu instead of virtwl
Date: Mon, 10 Oct 2022 16:53:57 +0000	[thread overview]
Message-ID: <87czazd3h6.fsf@alyssa.is> (raw)
In-Reply-To: <CAG4opy8Nm9mkRCQZY7wwkAY02Fk5kPx3HAhUHmDWQyRfEosxRQ@mail.gmail.com>

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

Thomas Leonard <talex5@gmail.com> writes:

> On Tue, 9 Aug 2022 at 12:01, Alyssa Ross <hi@alyssa.is> wrote:
>>
>> On Mon, Mar 21, 2022 at 04:05:34PM +0000, Alyssa Ross wrote:
>> > On Mon, Mar 21, 2022 at 12:10:43PM +0000, Thomas Leonard wrote:
>> > > I think perhaps that crosvm is compiled without the "virgl_renderer"
>> > > feature (it's not in the default set), and this is causing it to crash
>> > > because that's also "self.default_component". I don't know how to
>> > > compile crosvm with virgl enabled, though.
>> >
>> > It wasn't easy, but I got it to build[1].  I hope that helps.  It adds
>> > both virgl_renderer and virgl_renderer_next.  I think virgl_renderer
>> > is on by default with --gpu, and virgl_renderer_next is used with the
>> > --gpu-render-server argument.  Hopefully at least one of those does the
>> > right thing — let me know!
>> >
>> > [1]: https://github.com/NixOS/nixpkgs/pull/165128
>>
>> Small update: Nixpkgs unstable's crosvm package is now built with the
>> virgl_renderer and virgl_renderer_next features.
>
> I got this working eventually, but I had to apply a load of patches.
> How are you getting it to run?
>
> My patches are here: https://gitlab.com/talex5/crosvm/-/commits/main
>
> In particular:
> - It failed to start (when using virtio-gpu) because it doesn't have
> access to /nix/store, and

I haven't hit this one.  I've mostly been testing with vhost-user —
maybe crosvm devices don't run sandboxed when run standalone for
vhost-user, since running that device is the only thing the crosvm
process is doing?

> - It failed to send Wayland keymaps because they need to be mapped read-only

The vhost-user-gpu frontend implementation we wrote for cloud-hypervisor[1]
will map buffers as read-only if mapping them read-write fails[2].  This
is only a workaround for crosvm not setting the flags correctly in the
vhost-user message, though.  The real fix will be in crosvm.

Also, not all Wayland compositors require keymaps to be mapped
read-only.  wlroots does, but Weston doesn't.  I suspect Chromium
doesn't either, hence the bug persisting in crosvm.

[1]: https://spectrum-os.org/lists/archives/spectrum-devel/20220930210906.1696349-8-alyssa.ross@unikie.com/
[2]: https://spectrum-os.org/lists/archives/spectrum-devel/20b1f9da3af/s/?b=pkgs/applications/virtualization/cloud-hypervisor/0003-virtio-devices-add-a-GPU-device.patch#n247

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2022-10-10 16:54 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 19:27 New user getting started questions Thomas Leonard
2021-01-05 20:09 ` Michael Raskin
2021-01-06  7:04   ` Alyssa's break Alyssa Ross
2021-01-06  9:11     ` Michał "rysiek" Woźniak
2021-01-06  7:00 ` New user getting started questions Alyssa Ross
2021-01-06 15:56   ` Thomas Leonard
2021-01-07 11:38     ` Thomas Leonard
2021-01-07 15:33     ` Thomas Leonard
2021-01-14 12:29     ` Alyssa Ross
2021-01-14 12:51       ` Alyssa Ross
2021-01-20 13:04         ` Thomas Leonard
2021-01-27 17:31           ` Thomas Leonard
2021-03-07 12:52             ` Thomas Leonard
2021-03-09 16:59               ` Qubes-lite With KVM and Wayland Alyssa Ross
2021-03-10 14:19                 ` Thomas Leonard
2021-03-10 22:34                   ` Alyssa Ross
2021-03-09 16:25             ` New user getting started questions Alyssa Ross
2021-03-13  7:21               ` Thomas Leonard
2021-03-13 13:52                 ` Alyssa Ross
2021-10-30 12:58                 ` Thomas Leonard
2021-11-03 11:36                   ` Alyssa Ross
2021-11-03 18:27                     ` Thomas Leonard
2021-11-10 12:58                       ` Alyssa Ross
2021-11-10 12:00                         ` Thomas Leonard
2021-11-11 11:09                           ` Alyssa Ross
2021-11-11 16:12                             ` Thomas Leonard
2021-11-12 10:47                               ` Alyssa Ross
2022-03-13 15:08                         ` Thomas Leonard
2022-03-15 14:06                           ` Alyssa Ross
2022-03-15 20:23                             ` Alyssa Ross
2022-03-16 16:18                               ` Using virtio-gpu instead of virtwl Thomas Leonard
2022-03-16 16:54                                 ` Alyssa Ross
2022-03-21 12:10                                 ` Thomas Leonard
2022-03-21 16:05                                   ` Alyssa Ross
2022-03-22 11:08                                     ` Thomas Leonard
2022-03-22 11:16                                       ` Alyssa Ross
2022-03-22 20:05                                         ` Thomas Leonard
2022-04-06 12:19                                           ` Thomas Leonard
2022-04-13 17:12                                             ` Thomas Leonard
2022-04-14 13:57                                               ` Alyssa Ross
2022-04-19 12:58                                                 ` Thomas Leonard
2022-04-19 12:01                                                   ` Alyssa Ross
2022-05-15 15:20                                                 ` Thomas Leonard
2022-05-16 11:55                                                   ` Alyssa Ross
2022-05-18  9:55                                                     ` Thomas Leonard
2022-06-05 16:29                                                       ` Thomas Leonard
2022-08-09 12:00                                     ` Alyssa Ross
2022-10-10 15:16                                       ` Thomas Leonard
2022-10-10 16:53                                         ` Alyssa Ross [this message]

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=87czazd3h6.fsf@alyssa.is \
    --to=hi@alyssa.is \
    --cc=discuss@spectrum-os.org \
    --cc=puck@puckipedia.com \
    --cc=talex5@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).