From: Alyssa Ross <alyssa.ross@unikie.com>
To: devel@spectrum-os.org
Cc: Puck Meerburg <puck@puckipedia.com>,
Ville Ilvonen <ville.ilvonen@unikie.com>
Subject: [RFC PATCH v2 00/10] Initial support for VM Wayland
Date: Fri, 30 Sep 2022 21:35:23 +0000 [thread overview]
Message-ID: <20220930213533.1710618-1-alyssa.ross@unikie.com> (raw)
IMPORTANT NOTE: this series should be applied on top of my previous
series "Introduce a shared base for application VMs" [1]. This is a
bit inconvenient I know, but I haven't committed the other series yet
due to wanting to take a second pass at it.
Changes since v1:
- Fix syntax in img/app development Makefile target.
- Enable virgl for virtio-gpu devices (see below).
v1: https://spectrum-os.org/lists/archives/spectrum-devel/20220928170128.1583791-1-alyssa.ross@unikie.com/
Introduction
------------
This series adds the Spectrum-side support for running VMs that can
display Wayland windows on the host compositor, using virtio-gpu.
There are various small things still to be resolved, but it's ready
for other people to try out and test.
The easiest way to test this out is to run "vm-start hello-wayland" on
the Spectrum host. If everything goes well, a small window with a
picture of a cat (hello-wayland) should appear. This window is
running in a VM.
Currently, virgl is enabled for all virtio-gpu devices. This means
that all VMs will have GPU acceleration enabled. This is currently
required to work around what appears to be a kernel bug that causes
applications to freeze, but is likely not something we want to be
enabling by default once that's fixed.
I have tested with hello-wayland, as in the appvm provided as a
demonstration here, and also with foot (by replacing hello-wayland
with foot in that VM). I haven't done enough testing with this
version of the code to guage how reliably they work yet.
[1]: https://spectrum-os.org/lists/archives/spectrum-devel/20220919073659.1703271-1-hi@alyssa.is/
[2]: https://spectrum-os.org/lists/archives/spectrum-devel/20220928170128.1583791-1-alyssa.ross@unikie.com/
Alyssa Ross (10):
host/start-vm: use MAP_SHARED memory for VMs
img/app: don't block app startup on network online
img/app: add Wayland over virtio-gpu support to kernel
vm-lib: add mesa drivers to VM
img/app: add support for testing virtio-gpu
img/app: add support for testing in crosvm
host/start-vm: factor out VM definition path
host: add support for Wayland in VMs
vm/app: add hello-wayland demo VM
host/start-vm: disable cloud-hypervisor sandbox
Documentation/creating-vms.adoc | 5 +++
host/initramfs/extfs.nix | 3 ++
host/rootfs/Makefile | 4 +++
host/rootfs/default.nix | 4 +--
host/rootfs/etc/s6-rc/ext-rc-init/up | 8 +++++
host/rootfs/etc/template/gpu/data/check | 5 +++
host/rootfs/etc/template/gpu/notification-fd | 1 +
.../etc/template/gpu/notification-fd.license | 2 ++
host/rootfs/etc/template/gpu/run | 9 ++++++
host/rootfs/etc/template/gpu/type | 1 +
host/rootfs/etc/template/gpu/type.license | 2 ++
host/start-vm/start-vm.rs | 26 +++++++++------
img/app/Makefile | 32 +++++++++++++++++--
img/app/default.nix | 3 +-
img/app/etc/mdev/iface | 2 +-
img/app/etc/mdev/listen | 12 +++++++
img/app/etc/mdev/wait | 15 +++++++++
img/app/etc/s6-rc/ok-all/contents | 1 +
img/app/shell.nix | 2 +-
vm-lib/make-vm.nix | 14 ++++++--
vm/app/catgirl.nix | 1 +
vm/app/hello-wayland.nix | 25 +++++++++++++++
vm/app/lynx.nix | 1 +
23 files changed, 159 insertions(+), 19 deletions(-)
create mode 100755 host/rootfs/etc/template/gpu/data/check
create mode 100644 host/rootfs/etc/template/gpu/notification-fd
create mode 100644 host/rootfs/etc/template/gpu/notification-fd.license
create mode 100755 host/rootfs/etc/template/gpu/run
create mode 100644 host/rootfs/etc/template/gpu/type
create mode 100644 host/rootfs/etc/template/gpu/type.license
create mode 100755 img/app/etc/mdev/listen
create mode 100755 img/app/etc/mdev/wait
create mode 100644 vm/app/hello-wayland.nix
--
2.37.1
next reply other threads:[~2022-09-30 21:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 21:35 Alyssa Ross [this message]
2022-09-30 21:35 ` [RFC PATCH v2 01/10] host/start-vm: use MAP_SHARED memory for VMs Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 02/10] img/app: don't block app startup on network online Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 03/10] img/app: add Wayland over virtio-gpu support to kernel Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 04/10] vm-lib: add mesa drivers to VM Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 05/10] img/app: add support for testing virtio-gpu Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 06/10] img/app: add support for testing in crosvm Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 07/10] host/start-vm: factor out VM definition path Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 08/10] host: add support for Wayland in VMs Alyssa Ross
2022-09-30 21:35 ` [RFC PATCH v2 09/10] vm/app: add hello-wayland demo VM Alyssa Ross
2022-09-30 21:38 ` [RFC PATCH v2 10/10] host/start-vm: disable cloud-hypervisor sandbox Alyssa Ross
2022-09-30 21:44 ` Alyssa Ross
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=20220930213533.1710618-1-alyssa.ross@unikie.com \
--to=alyssa.ross@unikie.com \
--cc=devel@spectrum-os.org \
--cc=puck@puckipedia.com \
--cc=ville.ilvonen@unikie.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.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
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).