Skip to content

Commit

Permalink
crosvm: sync gpu params with cloud-hypervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
phaer authored and astro committed Oct 3, 2023
1 parent c28a0e0 commit e444980
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/runners/crosvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ let
aarch64-linux = "${kernel.out}/${pkgs.stdenv.hostPlatform.linux-kernel.target}";
}.${system};

gpuParams = {
context-types = "virgl:virgl2:cross-domain";
egl = true;
vulkan = true;
};

in {

preStart = ''
rm -f ${socket}
${microvmConfig.preStart}
Expand All @@ -42,8 +49,8 @@ in {
rm -f ${graphics.socket}
${pkgs.crosvm}/bin/crosvm device gpu \
--socket ${graphics.socket} \
--wayland-sock $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY \
--params '{"context-types":"virgl:virgl2:cross-domain"}' \
--wayland-sock $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY\
--params '${builtins.toJSON gpuParams}' \
&
while ! [ -S ${graphics.socket} ]; do
sleep .1
Expand Down

0 comments on commit e444980

Please sign in to comment.