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 7C0FDAC25; Fri, 26 Jun 2026 14:45:43 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 910F5ABA4; Fri, 26 Jun 2026 14:45:41 +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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) by atuin.qyliss.net (Postfix) with ESMTPS id 9DB15ABA3 for ; Fri, 26 Jun 2026 14:45:39 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 035961D0014B; Fri, 26 Jun 2026 10:45:36 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 26 Jun 2026 10:45:37 -0400 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=fm3; t=1782485136; x=1782571536; bh=M8ayw/GB0B 5FMMyxJGhjArzCtoNw9Tg+pk5qTDdLZlw=; b=LwREzO8r/IouCHPR+9nQfySP/g Zh5YlaCXS/i4K+VX1bJvfR6sCBLLvov8QR7LBuAmlIm5wNAxHLENorgbpfENrfLa QjnhWS5Go1D09VA5xZehJ4xCwV35e8zaCyNH0LT5ePYn1HO4AEYyL8v4lsiDKQut 3BDMleSJQtekouXL3qdqiA6BvkYOYX2AwzcqPOxHokGgv3Q8fVDbl/kRII/lOpZE 4DpW2wJnKwCz6KGUGyQL49LBfXpqB/XpUGLc3wpRTCdr9MVhlGrfLQTi19i3Ptc5 xu0h/YMETY48Jzm5GufhG7IwixnyqS4fP96yE8grdqb2PYjkBlcjFfqg9S+w== 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=fm1; t= 1782485136; x=1782571536; bh=M8ayw/GB0B5FMMyxJGhjArzCtoNw9Tg+pk5 qTDdLZlw=; b=UwOs+MSqgmsixKtHlLcxDCFNgr+kOjOqqVsIb3S3p+deZYdoUI9 Mya8pd8LpQbUbxYNlhQt6IS9MUiRL38DXdIfVUQv1BmcASyOy+gOCOZ6YBnBFlFX jfSHqARVBy8qFE4K1rHWJAuXPAyo72BugiPvxSNI07xbaF9FIgQM1BVPzZyhENRN wMoDsrcUlXDN0ehF3kUd/mGYYqxkWxNJMNizmNWt+tzq/oheBY3H/MonA5ta1NDk dGGhyJxtNlhup1Npz8r9IDrtdbB1pPl38YVqpjnSFVZTvarQ+TcZVZjTdssKAx78 8ysd+oPjNawsMPwaY1ojaL+/3Baxixs2LlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEBsTGQ03k7XLXIxMMoojeFADD+l8moN+LcLY3yXF/C4qX4IH8XxbBl5p0XqDfd28 CJ5AXqlyoaeL4QXVevgn/MuLNJsCO2rRuZTFXfes+qANu9xOeoStGlTDzW5KqKULdQlsJe OaXGIkA6aVKmd8IARsorB+pMqYuVShvNxjpygOcAxAx/tH2pv62qE+pD0ZzndvhPnql+Vg fN1bOpW5wB/Dei1uiIeyQriQQkYfDYaLHwmNDmeGUD/7r4HYYceIYWqfm+tuVppdVJFMKQ d/JrfIH7kRYRfTVGhOtdsQwpQVwsRUT5dJ7pf6kKFG4yG1wl1d5i6v2DWzf121KhUwWvOy ut4NgRnTZZJJpGGM67yAGzwTq1BFFatDpW5hj6/+Rl+4eniy07p+KQENma9Ou0M15hoyd+ kdbl1XWNaFWY+Bpv1SFxoJwC4UhOC1BNh2SpiNR0n0ufkP200U7ZXZ8WFMPC34tuQ04SpK 2lsBkoJkkJcHoTLxPo/V0mLNGHO9HsXyxnnxOZ/7Fc7888JcK0x18NCj6tYHD4D3mkGTLX Okz6JZNShc+sFDZbrO2v/6GXrlsHU3jKd/4WAU0IejfaPAhegV9X6fMs5v5vFt67dtTl95 FDc+Q3ixNfDfJr1aX7R0M6Npg3EVwd9feLMgu/dueee6exG4nK+kCLIdOJbA X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Jun 2026 10:45:36 -0400 (EDT) Received: by fw12.qyliss.net (Postfix, from userid 1000) id B00E8B9B5003; Fri, 26 Jun 2026 16:45:33 +0200 (CEST) From: Alyssa Ross To: colbyt Subject: Re: [PATCH 3/6] vm: use vhost-user networking for crosvm In-Reply-To: <1f9b01987e964c245ada51ca0f87500bef54bc96.1782409229.git.colby@colbyt.com> References: <1f9b01987e964c245ada51ca0f87500bef54bc96.1782409229.git.colby@colbyt.com> Date: Fri, 26 Jun 2026 16:45:32 +0200 Message-ID: <87echtfjhv.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: OBBADMXDZJXEKSP35EFYPZ5VUGSO4I5Z X-Message-ID-Hash: OBBADMXDZJXEKSP35EFYPZ5VUGSO4I5Z X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; 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; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: devel@spectrum-os.org X-Mailman-Version: 3.3.10 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 Content-Transfer-Encoding: quoted-printable colbyt writes: > The crosvm VM test paths used raw tap networking for their primary > network device, while the Cloud Hypervisor paths already used Spectrum's > passt-backed vhost-user-net helper. > > Start the existing helper for crosvm and pass it to crosvm with > --vhost-user net,socket=3Dbuild/vhost-user-net.sock. The net VM still > keeps tap1 for its downstream interface, and the start-vhost-user-net > targets are marked phony like the other service-start targets. > > Signed-off-by: colbyt > --- > img/app/Makefile | 7 ++++--- > vm/sys/net/Makefile | 5 +++-- > 2 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/img/app/Makefile b/img/app/Makefile > index fd75e6e..915db3d 100644 > --- a/img/app/Makefile > +++ b/img/app/Makefile > @@ -84,6 +84,7 @@ start-vhost-user-gpu: > start-vhost-user-net: > mkdir -p build > ../../scripts/start-passt.elb > +.PHONY: start-vhost-user-net >=20=20 > start-virtiofsd: scripts/start-virtiofsd.elb > mkdir -p build > @@ -127,11 +128,11 @@ run-cloud-hypervisor: $(imgdir)/appvm/blk/root.img = start-vhost-user-gpu start-vh > --serial file=3Dbuild/serial.log > .PHONY: run-cloud-hypervisor >=20=20 > -run-crosvm: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-virt= iofsd > - ../../scripts/with-taps.elb $(CROSVM_RUN) \ > +run-crosvm: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-vhos= t-user-net start-virtiofsd > + $(CROSVM_RUN) \ > -b path=3D$(imgdir)/appvm/blk/root.img,ro=3Dtrue \ > -p "console=3DttyS0 root=3DPARTLABEL=3Droot" \ > - --net tap-name=3Dtap0,mac=3D02:00:00:00:00:01 \ > + --vhost-user net,socket=3Dbuild/vhost-user-net.sock \ > --vhost-user fs,socket=3Dbuild/virtiofsd.sock \ > --vhost-user gpu,socket=3Dbuild/vhost-user-gpu.sock \ > --vsock cid=3D3 \ I'm not sure about this. If we lose the ability to set the MAC, the VM can't recognize this as a Spectrum internal interface, and configure it appropriately. At present the only configuration involved is setting the interface up, but I'm not sure it's so useful to test with an interface that to the VM looks like a passed through physical interface, which would be an unusual (but not impossible) thing for an app VM to have. > diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile > index 653ef13..e37fe8c 100644 > --- a/vm/sys/net/Makefile > +++ b/vm/sys/net/Makefile > @@ -63,6 +63,7 @@ debug: > start-vhost-user-net: > mkdir -p build > ../../../scripts/start-passt.elb > +.PHONY: start-vhost-user-net >=20=20 > run-qemu: $(vmdir)/netvm/blk/root.img > @../../../scripts/run-qemu.sh -m 256 -cpu max -kernel $(KERNEL) -vga no= ne \ > @@ -93,11 +94,11 @@ run-cloud-hypervisor: $(vmdir)/netvm/blk/root.img sta= rt-vhost-user-net > --serial file=3Dbuild/serial.log > .PHONY: run-cloud-hypervisor >=20=20 > -run-crosvm: $(vmdir)/netvm/blk/root.img > +run-crosvm: $(vmdir)/netvm/blk/root.img start-vhost-user-net > ../../../scripts/with-taps.elb $(CROSVM_RUN) \ > -b path=3D$(vmdir)/netvm/blk/root.img,ro=3Dtrue \ > -p "console=3DttyS0 root=3DPARTLABEL=3Droot" \ > - --net tap-name=3Dtap0 \ > + --vhost-user net,socket=3Dbuild/vhost-user-net.sock \ > --net tap-name=3Dtap1,mac=3D02:01:00:00:00:01 \ > --serial type=3Dfile,hardware=3Dserial,path=3Dbuild/serial.log \ > --serial type=3Dstdout,hardware=3Dvirtio-console,stdin=3Dtrue \ This is fine though, since here we're using passt to simulate a physical device that wouldn't have a special MAC. The .PHONY additions are of course also correct, so I propose applying this patch minus the change to run-crosvm in img/app. What do you think? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaj6QjAAKCRCZddwkt31p FSGwAQDtiex2SStEGTRwtax8mGfEptg8MzvLgcg69DyQz8WTYQEA6LcsMfqZuUPI wvrssXNQBZDW5uyNfIgmHnlL/Oxgzgc= =i/9C -----END PGP SIGNATURE----- --=-=-=--