patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: Dom Rodriguez <shymega@shymega.org.uk>
Cc: devel@spectrum-os.org
Subject: Re: [PATCH v2] crosvm: Rename `--vhost-user-{fs,gpu}` args
Date: Sat, 07 Sep 2024 18:40:28 +0200	[thread overview]
Message-ID: <877cbnfmdf.fsf@alyssa.is> (raw)
In-Reply-To: <20240906224329.2336996-1-shymega@shymega.org.uk>

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

Dom Rodriguez <shymega@shymega.org.uk> writes:

> crosvm was producing warnings when using `--vhost-user-gpu` and
> `--vhost-user-fs`.
>
> In this commit, I have adjusted the `crosvm` invocations to look
> something like `--vhost-user $DEVICE,socket=$PATH`, where `$DEVICE` is, in this case,
> `gpu` or `fs`, and `$PATH` is the path to the Unix socket.
>
> Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
> ---
>  img/app/Makefile                   | 4 ++--
>  release/checks/wayland/default.nix | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/img/app/Makefile b/img/app/Makefile
> index 3adf8c4..11ef6e1 100644
> --- a/img/app/Makefile
> +++ b/img/app/Makefile
> @@ -152,8 +152,8 @@ run-crosvm: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-virtiofsd
>  	    --disk $(RUN_IMG) \
>  	    -p "console=ttyS0 root=PARTLABEL=root" \
>  	    --net tap-name=tap0 \
> -	    --vhost-user-fs build/virtiofsd.sock:virtiofs0 \
> -	    --vhost-user-gpu build/vhost-user-gpu.sock \
> +	    --vhost-user fs,socket=build/virtiofsd.sock:virtiofs0 \
> +	    --vhost-user gpu,socket=build/vhost-user-gpu.sock \
>  	    --vsock cid=3 \
>  	    --serial type=file,hardware=serial,path=build/serial.log \
>  	    --serial type=stdout,hardware=virtio-console,stdin=true \

This is still not right, I'm afraid.

When I run nix-shell --run 'make clean && make run' VMM=crosvm in
img/app, I get this error:

[2024-09-07T16:36:32.592274891+00:00 ERROR crosvm] exiting with error 1: failed to connect to vhost-user socket path build/virtiofsd.sock:virtiofs0

Probably the tag should also be a comma-separated key=value option?

(This doesn't have any automated test, because it's just part of the
development environment, and setting up a test environment to resemble a
development machine isn't trivial.  Should be possible though.)

> diff --git a/release/checks/wayland/default.nix b/release/checks/wayland/default.nix
> index d05aa88..a36dbab 100644
> --- a/release/checks/wayland/default.nix
> +++ b/release/checks/wayland/default.nix
> @@ -29,7 +29,7 @@ nixosTest ({ lib, pkgs, ... }: {
>      systemd.services.crosvm = {
>        after = [ "crosvm-gpu.service" "weston.service" ];
>        requires = [ "crosvm-gpu.service" "weston.service" ];
> -      serviceConfig.ExecStart = "${lib.getExe pkgs.crosvm} run -s /run/crosvm --disk ${appvm}/img/appvm/blk/root.img --disk ${run}/blk/run.img -p \"console=ttyS0 root=PARTLABEL=root\" --vhost-user-gpu /run/crosvm-gpu.sock --vsock cid=3 --serial type=stdout,hardware=virtio-console,stdin=true ${appvm}/img/appvm/vmlinux";
> +      serviceConfig.ExecStart = "${lib.getExe pkgs.crosvm} run -s /run/crosvm --disk ${appvm}/img/appvm/blk/root.img --disk ${run}/blk/run.img -p \"console=ttyS0 root=PARTLABEL=root\" --vhost-user gpu,socket=/run/crosvm-gpu.sock --vsock cid=3 --serial type=stdout,hardware=virtio-console,stdin=true ${appvm}/img/appvm/vmlinux";
>        serviceConfig.ExecStop = "${lib.getExe pkgs.crosvm} stop /run/crosvm";
>      };

This part works now though, thanks!

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

  reply	other threads:[~2024-09-07 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 22:42 [PATCH v2] crosvm: Rename `--vhost-user-{fs,gpu}` args Dom Rodriguez
2024-09-07 16:40 ` Alyssa Ross [this message]
2024-09-21 22:52   ` Dom Rodriguez
2024-09-28 14:27     ` Alyssa Ross
2024-10-18 19:53       ` Dom Rodriguez
2024-10-21  9:08         ` Alyssa Ross
2024-10-21 19:53           ` Alyssa Ross
2024-11-09  1:03       ` Dom RODRIGUEZ
2024-11-09 21:46         ` Alyssa Ross
2024-11-11  1:35           ` Dom Rodriguez
2024-11-11 10:49             ` 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=877cbnfmdf.fsf@alyssa.is \
    --to=hi@alyssa.is \
    --cc=devel@spectrum-os.org \
    --cc=shymega@shymega.org.uk \
    /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).