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 72CE66920; Wed, 22 Jul 2026 02:17:27 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 290F2687D; Wed, 22 Jul 2026 02:17:25 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by atuin.qyliss.net (Postfix) with ESMTPS id 3D3806903 for ; Wed, 22 Jul 2026 02:17:24 +0000 (UTC) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-80e24970f1dso64943487b3.0 for ; Tue, 21 Jul 2026 19:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784686643; x=1785291443; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/FdPhewwtfnIitIohM1ARdsiyiaXx6akzltUGIFlDTI=; b=KobrC9G10tkF9vSXNZPPLizB5HB+hWs8RjogTB3SZOOz50bIThzpRGH5tWIYsr41LM w3kAioSwzwIKBG/rLEaZszu3yVhKRmiz+Efe4Rs77Omv5KlQmTUbB29RkZiDo8lQi9Rl nNZloIDv2pMD2XbAKiOTr8aFSq09uAb/n0JRa3YfpLGpupox5HtN0yutkYcZ5MCmNaTM t5QpN8VvsaaZfXbAbkp90cKV/SKwOwFV2yEZLYBfg2MnkGncm1fUmDwkDQQkilAWvh3s 1Ox0noLq/uhGJw3Jcj+NaTfQNuMAnFYYibDR4SdGEJ2KHJdcgQk+8vVAq2fJdCUVTSKQ IXog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784686643; x=1785291443; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/FdPhewwtfnIitIohM1ARdsiyiaXx6akzltUGIFlDTI=; b=qsufwx50LLhmMXxJcWtbsldjVimyHapGVAXc6fkmqoW2qwRtO9u0pvNTN8zItt4TvJ lpnb7dAQMZOddTibQYOS3G0SE3a+bZq4Llb0AP+rwELHLgXnCyWilNA9QxT91w1cS6xn EfO/I9CLdCGFhUKjumKmQPn20wyVp5M18zRl5QcPw/eFtR2uXojWnQbwQz7pusYyVHoV PkDb/L2lCHQtaFNtMhv4xWeuzCY5exbXapi5H0sUg+/wdwBuvuGZFS1wbCvGJG8p+S3C N39kTKmrLNY3S4Q5ShfJxAtXYhmLnEsxm46/vmI3Amw/jP6k9CZwy8Yo3yNqp7+T+0Au 4oGw== X-Gm-Message-State: AOJu0Yxxju35Xo0iQRSF6l1pjtanbwTttlK/ugVp7gATqWcmA6St/tnj IWjxsT7JD6O7d/bi45RLLMAya6ZKXCRW7zu9RBhO4qMOL5RQXxDXYjivH1nv9A== X-Gm-Gg: AR+sD120+hC9QsbgOufGTO9pDfHBrZ5Ak0YTJick4a2t3sNRTM8eSw8d37I6jGmpd8F OSdZMLdQCKGROM1dyRNG5K1CIFTwoYku9HpCRKBBp2kUKWnQmx/oEJ5kgEw1dmZHAV7MaPxwyel HvsJZBlE5C9xNCP52VzLYEbG3RVBp5e56xcVj8O6dtFMO0yCf6UvuzJzJhWlDPcWxVpR+CkDgkK o1qjlI+d/gNbAOGwAOxtrAjBCSSo04VtW6kA3WnMSGtLz78X98fVYRhcxD2QUnKpY5hfWqOsAa4 8X3TOCcXogQI51ch/AAk49zIZ2UQVPf+Ok65rsix5Xf2NaioWOEyP9cpsJfREN1GNXofNVwTJav PIYuXKUlBXXNUgL4yCXXSIV1W2IXLEjQd1/tNZOhiNuk3oCsQtnORiEForhhnBB7Wu/0/WaBxx7 /PAVmiX0PWK4x1ZLU= X-Received: by 2002:a05:690c:6c0d:b0:81e:abe2:e01b with SMTP id 00721157ae682-81ef23f7054mr70881357b3.26.1784686642805; Tue, 21 Jul 2026 19:17:22 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-81f33ddda95sm6680367b3.35.2026.07.21.19.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 19:17:21 -0700 (PDT) From: Demi Marie Obenour Date: Tue, 21 Jul 2026 21:59:21 -0400 Subject: [PATCH v4 16/20] host/rootfs: vhost-user-gpu: Run in cgroup MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260721-cgroups-v4-16-46b2e5fff7b6@gmail.com> References: <20260721-cgroups-v4-0-46b2e5fff7b6@gmail.com> In-Reply-To: <20260721-cgroups-v4-0-46b2e5fff7b6@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784685545; l=3130; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=psRMjW8p15OzZNRSfEz8ToQAqhBXsII77ZLkp1/LnG8=; b=R+yGB2hBXXos11NanrFQmGaoNqdidt6yQjlvEFdyxuZgb9nZwU+uRt6pyR/RrkLkV3gfETAj4 GdCtFMiu609ACo2+bxw6Gteu0sIIeTDuUoEEQxCHsfu2aQ/G3SveHH3 X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: LLMBCFB44I7HKPRR7BOO54B2BHM65DJ7 X-Message-ID-Hash: LLMBCFB44I7HKPRR7BOO54B2BHM65DJ7 X-MailFrom: demiobenour@gmail.com X-Mailman-Rule-Hits: member-moderation 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 CC: Demi Marie Obenour , Alyssa Ross 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: Use vm-service-run for this. Signed-off-by: Demi Marie Obenour --- host/rootfs/file-list.mk | 1 + .../vm-services/template/data/service/vhost-user-gpu/finish | 5 +++++ .../service/vm-services/template/data/service/vhost-user-gpu/run | 9 +++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index 9a0f231611e4046737141a86ed5b39523c73a022..616c1cdef8241158631240ea8a174bc3bf3b5e0f 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -37,6 +37,7 @@ FILES = \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/finish \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run \ + image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/finish \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/notification-fd \ diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/finish b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/finish new file mode 100755 index 0000000000000000000000000000000000000000..4d5b454e97c3584d0644c2d738514f13b1c53957 --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/finish @@ -0,0 +1,5 @@ +#!/usr/bin/execlineb -WS3 +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2026 Demi Marie Obenour + +cgroup-s6-finish $@ diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run index c3bfafe02ec6d2ee418fe56b033bbc4c7a73b186..49978bf9e4e600198cd3f8704c33229518a8fa60 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run @@ -1,14 +1,11 @@ -#!/bin/execlineb -WP +#!/bin/execlineb -Wp # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2025 Alyssa Ross # SPDX-FileCopyrightText: 2025 Demi Marie Obenour -s6-ipcserver-socketbinder -a 0700 -b 1 env/crosvm.sock +vm-service-run -multisubstitute { - importas -Siu VM - importas -Si WAYLAND_DISPLAY -} +s6-ipcserver-socketbinder -a 0700 -b 1 env/crosvm.sock if { chown vmm-${VM} env/crosvm.sock } -- 2.55.0