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 D6D55DBA4; Tue, 23 Sep 2025 18:39:52 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 461A1DB9C; Tue, 23 Sep 2025 18:39:50 +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-a4-smtp.messagingengine.com (fout-a4-smtp.messagingengine.com [103.168.172.147]) by atuin.qyliss.net (Postfix) with ESMTPS id 9B7EDDB98 for ; Tue, 23 Sep 2025 18:39:48 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 0F3A4EC01E2; Tue, 23 Sep 2025 14:39:47 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Tue, 23 Sep 2025 14:39:47 -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=1758652787; x=1758739187; bh=i6Nta7SuTA Bi0FQNKylhF9J8F+950gHnS/RJHT0AWm8=; b=kzzV1UdfQ5JLoB2RP5TRYS40mf Xsb1eYFkqf727jAArhUMrQoztUz6PQBY4p+YKMtbarU+CEE+4vf6PbysQazfkHBF u0B6yVv7/gNeMAQktc3xK1fBgapzuJGLqTWyy9vHlNvjuQMn73Su8CKhNESYCR+9 ahfIcpZYkPtDPgW3wjm5iU3K4iBH8a+EGMUh1fn3TD3ucWfcHkOR8sJPcCbTxv/1 GKT2tVi3UqfEsygzotik0xxlca/nZIW5SeRNvNYbPAtkNbog4bZqJ1bhsocleN+G pyf9KnsFWrGuieH7QvyZzkVR8mQJWLSs4CRkNhneanu2V5C1/ZToM6mOZ/SA== 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= 1758652787; x=1758739187; bh=i6Nta7SuTABi0FQNKylhF9J8F+950gHnS/R JHT0AWm8=; b=lPBNd4ms30ucWJht5nG4OvDkw6qxf8SZrmNOhVESq0KxHoyC9q+ hOya8WbKdjZ+KvO4+/TJdbKB3V1LiOj7UaZn9wXKorBJ7WQhLjK+cOYtw9Z8RL8/ 2MqwnEUyJprsjGAhbZIsiXRTe3e62nOsND5KDoc0oPW/mHxqaS7XZFfuvCdU+M94 /Q0MQEa0oE7tna5MjuSmtbUPwaXrkXYzB2+IG0Z/8i8bqhwV2alfD/HiqRpCYlN+ KQ5cEyRDE7oba4W1ugSCGJW1z1v560/+B7QAvOn8n+RCueqzVt1igyCUMu8+oAly WyrGW/0IQ718ByC1LzMAQOnFI7PXufrNZgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdeiudegjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Sep 2025 14:39:46 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 6771D24C87C2; Tue, 23 Sep 2025 20:39:40 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH 3/3] host/rootfs: switch to systemd-udevd In-Reply-To: <184ada43-8d41-4eb5-891a-1516659b20b2@gmail.com> References: <20250913-udev-v1-0-eade4ab8f2b4@gmail.com> <20250913-udev-v1-3-eade4ab8f2b4@gmail.com> <87ikhesf86.fsf@alyssa.is> <184ada43-8d41-4eb5-891a-1516659b20b2@gmail.com> Date: Tue, 23 Sep 2025 20:39:39 +0200 Message-ID: <87ldm5ko7o.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: F2ZYYVMRVRJQHSLLMVURLJJW7SA3CRZ3 X-Message-ID-Hash: F2ZYYVMRVRJQHSLLMVURLJJW7SA3CRZ3 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: Spectrum OS Development 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 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 9/19/25 10:12, Alyssa Ross wrote: >> I'm pleasantly surprised by how straightforward this is (mostly)! >>=20 >> Demi Marie Obenour writes: >>=20 >>> diff --git a/host/rootfs/etc/udev/rules.d/99-spectrum.rules b/host/root= fs/etc/udev/rules.d/99-spectrum.rules >>> new file mode 100644 >>> index 0000000000000000000000000000000000000000..199397bc26874a261c9e1ea= 1778207fdb0d8ad39 >>> --- /dev/null >>> +++ b/host/rootfs/etc/udev/rules.d/99-spectrum.rules >>> @@ -0,0 +1,5 @@ >>> +# SPDX-License-Identifier: EUPL-1.2+ >>> +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour >>> +ACTION!=3D"remove", KERNEL=3D=3D"kvm", RUN+=3D"/etc/mdev/listen kvm" >>> +ACTION!=3D"remove", ENV{PCI_CLASS}=3D=3D"2????", RUN+=3D"/etc/mdev/net= /add" >>> +ACTION!=3D"remove", ENV{MODALIAS}=3D=3D"?*", RUN+=3D"/usr/bin/modprobe= -q $env{MODALIAS}" >>=20 >> Can't we rely on the default rule in 80-drivers.rules to load modules >> based on modalias? >>=20 >> Would ACTION=3D=3D"add" be more appropriate for the PCI devices? I don't >> think we'd want to re-add them to a VM on any other action? > > 'udevadm trigger' generates change events. Generally, one should only > distinguish between ACTION=3D=3D"remove" and ACTION!=3D"remove", and make= rules > idempotent so that it is okay if they are triggered more than once. > Anything else is considered a bug by upstream. Got a link to somewhere I can read more about that? Would not currently be good to re-run /etc/mdev/net/add, because it would unplug and replug the device. I can probably take a look at that if you want. It's not ideal to run /etc/mdev/listen multiple times either, but if I understood one of your other messages correctly there's some better udev thing we can switch to for that anyway. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaNLpawAKCRBbRZGEIw/w opxqAQC7AfQC5YSO/mpwo/9/sOxSbkqyXnGz5FbLMn4JpjGWbQEAyA0Htr/dW0BA lWMXggMbRWh0wI1LD/mf1Ln4eboXHgI= =wCCA -----END PGP SIGNATURE----- --=-=-=--