From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id DE2221F03C; Mon, 11 Nov 2024 10:50:03 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 1B05E1F092; Mon, 11 Nov 2024 10:49:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DMARC_MISSING, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b4-smtp.messagingengine.com (fout-b4-smtp.messagingengine.com [202.12.124.147]) by atuin.qyliss.net (Postfix) with ESMTPS id 71FE31F090 for ; Mon, 11 Nov 2024 10:49:56 +0000 (UTC) Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id BEF5411401B3; Mon, 11 Nov 2024 05:49:54 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Mon, 11 Nov 2024 05:49:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1731322194; x=1731408594; bh=2OhlNCiTP3 7c6lSREOLyJTt3yUihV5s37P6+OnXeom0=; b=ZIyHO2ClsF9+s17gold4sH60vs nN/a5UZV2FM98cvZ81hexRscNndw6poUG8uc6XhfEYY9upg9wveMF9VEaUyUEgzo +pve3YWAYpgPtUXd0sHcXsC/sHn9NhZZymMYM+Mgg2fL9z+kdYVMLlIZMAHbiDjZ WFezgEoek97nOC5g+5Nc5ZrKFHbUs/EkVW4VcKbkyH26lvFWVZa9G4MaqBVHo3Qk rzQJEdBd6SzkIze46cjJjc+CuDjo3BvNNVinCPKoOktlwEvE+Z3Du+37UPbFmQKZ twcRsQMPeSLldNs/ZOuP+hbVhWE4WFKYhR/PC/D02xhBcHqOOS1+oS7PGMOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1731322194; x=1731408594; bh=2OhlNCiTP37c6lSREOLyJTt3yUihV5s37P6 +OnXeom0=; b=Om5kbkckj65/iUHGXFZIs45SwqZUQc0+lh/bsbofxzd/xdbCbD2 dMYHIWk4+9mrodVSmxV/xRL1K6C6tqCN/ZHk20JphjclrpELVnsDhOUOs3qdMYBg Far1hdt1cfhH5/vHZApI9ox43k+3BoyV8c26mFo/dGfREi7ZMTNR+8/d7Hr40P6u e+seh045ecOqm8pbmmZZpi+WvHCaIgum2GySHpiNlh3NWCUnyGi9iEpd0tXhoWTH KoXQO5e3TZWvVzUA/gikvpQUjs9BNAA/hqqfpbSW3FgdR9ZPZaZAv3Gy/bPSKDoi 1ltIAaI1zKvTrsAr0CFyM5NgXcqWkS8y+TQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufgjfhffkfggtgesghdtreertddtjeenucfh rhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrf grthhtvghrnhepteehvedugfejgfehhfeijeduleekleejgedvkeeuuefhhfegvdevfeet veegteeinecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomh ephhhisegrlhihshhsrgdrihhspdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhp ohhuthdprhgtphhtthhopeguohhmihhnihgtrdhrohgurhhighhuvgiisehrohgurhhigh huvgiirdhorhhgrdhukhdprhgtphhtthhopehshhihmhgvghgrsehshhihmhgvghgrrdho rhhgrdhukhdprhgtphhtthhopeguvghvvghlsehsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Nov 2024 05:49:53 -0500 (EST) Received: by sf.qyliss.net (Postfix, from userid 1000) id 9B5BD12CA211D; Mon, 11 Nov 2024 11:49:51 +0100 (CET) From: Alyssa Ross To: Dom Rodriguez Subject: Re: [PATCH v2] crosvm: Rename `--vhost-user-{fs,gpu}` args In-Reply-To: References: <20240906224329.2336996-1-shymega@shymega.org.uk> <877cbnfmdf.fsf@alyssa.is> <87bk07am4z.fsf@alyssa.is> <5s7bk55k6d6vr6gywsx65pn2k7kqj5j4z722762vuqccey4yol@hx6vzlml76tg> <874j4g5bco.fsf@alyssa.is> Date: Mon, 11 Nov 2024 11:49:49 +0100 Message-ID: <87wmhacaeq.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: ER4Q2RCYODNXKBVCDCQYZ33Y3DI3TUYS X-Message-ID-Hash: ER4Q2RCYODNXKBVCDCQYZ33Y3DI3TUYS X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Dom RODRIGUEZ , devel@spectrum-os.org X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dom Rodriguez writes: > On 09.11.2024 22:46, Alyssa Ross wrote: >>Dom RODRIGUEZ writes: >> >>> On 28.09.2024 16:27, Alyssa Ross wrote: >>>>Dom Rodriguez writes: >>>> >>>>> On 07.09.2024 18:40, Alyssa Ross wrote: >>>>>>Dom Rodriguez 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=3D$PATH`, where `$DEVIC= E` is, in this case, >>>>>>> `gpu` or `fs`, and `$PATH` is the path to the Unix socket. >>>>>>> >>>>>>> Signed-off-by: Dom Rodriguez >>>>>>> --- >>>>>>> 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=3DttyS0 root=3DPARTLABEL=3Droot" \ >>>>>>> --net tap-name=3Dtap0 \ >>>>>>> - --vhost-user-fs build/virtiofsd.sock:virtiofs0 \ >>>>>>> - --vhost-user-gpu build/vhost-user-gpu.sock \ >>>>>>> + --vhost-user fs,socket=3Dbuild/virtiofsd.sock:virtiofs0 \ >>>>>>> + --vhost-user gpu,socket=3Dbuild/vhost-user-gpu.sock \ >>>>>>> --vsock cid=3D3 \ >>>>>>> --serial type=3Dfile,hardware=3Dserial,path=3Dbuild/serial.lo= g \ >>>>>>> --serial type=3Dstdout,hardware=3Dvirtio-console,stdin=3Dtrue= \ >>>>>> >>>>>>This is still not right, I'm afraid. >>>>>> >>>>>>When I run nix-shell --run 'make clean && make run' VMM=3Dcrosvm 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:virtio= fs0 >>>>>> >>>>>>Probably the tag should also be a comma-separated key=3Dvalue option? >>>>>> >>>>>>(This doesn't have any automated test, because it's just part of the >>>>>>development environment, and setting up a test environment to resembl= e a >>>>>>development machine isn't trivial. Should be possible though.) >>>>> >>>>> It's bizarre. I've done some more testing, and it seems that >>>>> `--vhost-user` isn't *quite* there yet on feature parity with >>>>> `--vhost-user-fs`. Maybe I'm going wrong here, but it doesn't recogni= se >>>>> the tag as a k/v option. >>>>> >>>>> I have managed to get the tests running with `--vhost-user-fs`, but it >>>>> does look mismatched now. >>>>> >>>>> Would you prefer I revert the changes to `--vhost-user fs` =3D> >>>>> `--vhost-user-fs`? >>>> >>>>You're right! I've just spent the last little while looking around >>>>trying to figure out what's up here, and I think I've figured it out. >>>> >>>>In this commit[1] they made the vhost-user-fs tag optional, because it >>>>can now be set with virtiosfd instead of the VMM. This is probably >>>>good, because the more generic vhost-user becomes, the more hope >>>>Spectrum has of one day not needing Cloud Hypervisor patches. :) So we >>>>could try using --vhost-user fs for crosvm, and then passing --tag to >>>>virtiofsd, but it'd need to be tested with VMM=3Dqemu and >>>>VMM=3Dcloud-hypervisor as well, because I'm not sure whether they suppo= rt >>>>a backend-provided tag. >>> >>> Finally got round to this. >>> >>> By the looks of it, currently `cloud-hypervisor` and QEMU do not suppor= t a >>> backend-provided tag. >>> >>> We could introduce an abstraction [function] in the Makefile over >>> `vhost-user-fs` arguments for each hypervisor, which we could use whilst >>> waiting for QEMU and cloud-hypervisor to support backend-provided tags >>> with `vhost-user-fs`, and in the meantime use the abstraction for >>> crosvm. >>> >>> I envision the abstraction as taking a few arguments: hypervisor, >>> virtiofsd socket path, and tag. The abstraction would then construct & >>> return the correct command-line argument for the hypervisor. We would >>> call the abstractive function in the call to the `run` Make target. >>> >>> That way, we're prepared for the future. >>> >>> What do you think? >> >>Given that they don't support the optional protocol feature, I'd expect >>cloud-hypervisor and QEMU to just ignore the tag given to virtiofsd =E2= =80=94 >>can we not just set the tag on the virtiofsd invocation for crosvm, and >>keep setting it in the cloud-hypervisor and QEMU command lines for them? > > That's a fair conclusion. Are you happy for me to submit a patch just > for crosvm for now? Yeah. Add the tag to the virtiofsd invocation, update the crosvm command line, then check that "make run" in a nix-shell still works with each of VMM=3Dcloud-hypervisor, VMM=3Dqemu, and VMM=3Dcrosvm, and let me kn= ow if you need help with anything. :) (I think QEMU might not be able to open application windows at the moment for upstream reasons, so if that's the case rather than checking an application window appears, you could instead just check that /run/virtiofs/virtiofs0 is non-empty in the QEMU serial console.) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCZzHhTgAKCRBbRZGEIw/w ogsQAP9Cz+pebuHn09q++fVK1KhEVwFedyy5ylJk+0PyPFFp9gEAq1/PV64QDqeu wPQfMKJvdqUrMzOzq5Ql+24NomfsAwQ= =P+uR -----END PGP SIGNATURE----- --=-=-=--