From fca84bde0f7d29bbcce78ac75eb8735d5bc9629e Mon Sep 17 00:00:00 2001 From: Ingo Reitz <9l@9lo.re> Date: Sun, 14 Dec 2025 00:56:15 +0100 Subject: [PATCH 01/10] linux/common-config: Enable coreboot firmware drivers --- pkgs/os-specific/linux/kernel/common-config.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 5ea3e16a8c55..c4f1181c64cd 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -1407,6 +1407,16 @@ let # Enable generic kernel watch queues # See https://docs.kernel.org/core-api/watch_queue.html WATCH_QUEUE = yes; + + # Enable coreboot firmware drivers. + # While these are called CONFIG_GOOGLE_*, they apply to coreboot systems in general. + GOOGLE_FIRMWARE = yes; + GOOGLE_CBMEM = whenAtLeast "6.2" module; + GOOGLE_COREBOOT_TABLE = module; + GOOGLE_MEMCONSOLE = module; + GOOGLE_MEMCONSOLE_COREBOOT = module; + GOOGLE_FRAMEBUFFER_COREBOOT = module; + GOOGLE_VPD = module; } // lib.optionalAttrs From 2228e7837e8df94645fd859bb51a1a7d95a82a0a Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Sat, 13 Dec 2025 17:17:15 +0100 Subject: [PATCH 02/10] nixos/test-driver: Document utility functions used in existing tests Co-authored-by: Jacek Galowicz --- .../src/test_driver/machine/__init__.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/nixos/lib/test-driver/src/test_driver/machine/__init__.py b/nixos/lib/test-driver/src/test_driver/machine/__init__.py index 31ea0d1364ae..2440fed2242e 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/__init__.py +++ b/nixos/lib/test-driver/src/test_driver/machine/__init__.py @@ -292,12 +292,18 @@ class Machine: return self.booted and self.connected def log(self, msg: str) -> None: + """ + Log a message to console. + """ self.logger.log(msg, {"machine": self.name}) def log_serial(self, msg: str) -> None: self.logger.log_serial(msg, self.name) def nested(self, msg: str, attrs: dict[str, str] = {}) -> _GeneratorContextManager: + """ + Get nested logger, optionally with extra attributes. + """ my_attrs = {"machine": self.name} my_attrs.update(attrs) return self.logger.nested(msg, my_attrs) @@ -357,6 +363,9 @@ class Machine: retry(check_active, timeout) def get_unit_info(self, unit: str, user: str | None = None) -> dict[str, str]: + """ + Get a dictionary of systemd unit properties, as obtained via `systemctl show`. + """ status, lines = self.systemctl(f'--no-pager show "{unit}"', user) if status != 0: raise RequestedAssertionFailed( @@ -384,6 +393,9 @@ class Machine: property: str, user: str | None = None, ) -> str: + """ + Get the string value of a single systemd unit property + """ status, lines = self.systemctl( f'--no-pager show "{unit}" --property="{property}"', user, @@ -431,6 +443,9 @@ class Machine: return self.execute(f"systemctl {q}") def require_unit_state(self, unit: str, require_state: str = "active") -> None: + """ + Assert that the current state of a unit has a specific value. The default state is "active". + """ with self.nested( f"checking if unit '{unit}' has reached state '{require_state}'" ): @@ -648,6 +663,10 @@ class Machine: return output def wait_for_shutdown(self) -> None: + """ + Wait for the VM to power off. This does *not* initiate a shutdown; + that's usually done via `shutdown()`. + """ if not self.booted: return @@ -687,6 +706,9 @@ class Machine: raise TimeoutError def get_tty_text(self, tty: str) -> str: + """ + Get the output printed to a given TTY. + """ status, output = self.execute( f"fold -w$(stty -F /dev/tty{tty} size | awk '{{print $2}}') /dev/vcs{tty}" ) @@ -785,15 +807,25 @@ class Machine: retry(port_is_closed, timeout) def start_job(self, jobname: str, user: str | None = None) -> tuple[int, str]: + """ + Start systemd service. + """ return self.systemctl(f"start {jobname}", user) def stop_job(self, jobname: str, user: str | None = None) -> tuple[int, str]: + """ + Stop systemd service. + """ return self.systemctl(f"stop {jobname}", user) def wait_for_job(self, jobname: str) -> None: self.wait_for_unit(jobname) def connect(self) -> None: + """ + Wait for a connection to the guest root shell + """ + def shell_ready(timeout_secs: int) -> bool: """We sent some data from the backdoor service running on the guest to indicate that the backdoor shell is ready. From 6062ffccd5ca2fb07472841ad27335df503bc9e3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 17 Dec 2025 18:45:15 +0100 Subject: [PATCH 03/10] linux/common-config: fix for Linux 6.1.y 6.1.y is old enough that we use simpledrm, but not old enough that GOOGLE_FRAMEBUFFER_COREBOOT supports simpledrm. Explicitly setting GOOGLE_FRAMEBUFFER_COREBOOT to module therefore broke 6.1.y build. Our kernel configuration system will always answer "m" where possible, so it's not usually necessary to set options to "module" like this. It's less fragile to rely on that default where possible. I've checked that building the kernel configfile now works on 5.10.y, 6.1.y, 6.12.y, and 6.18.y, and checked that all these options still get set to "m" on at least the latter two. Fixes: fca84bde0f7d ("linux/common-config: Enable coreboot firmware drivers") --- pkgs/os-specific/linux/kernel/common-config.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index c4f1181c64cd..5f285fa3eb5f 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -1411,12 +1411,6 @@ let # Enable coreboot firmware drivers. # While these are called CONFIG_GOOGLE_*, they apply to coreboot systems in general. GOOGLE_FIRMWARE = yes; - GOOGLE_CBMEM = whenAtLeast "6.2" module; - GOOGLE_COREBOOT_TABLE = module; - GOOGLE_MEMCONSOLE = module; - GOOGLE_MEMCONSOLE_COREBOOT = module; - GOOGLE_FRAMEBUFFER_COREBOOT = module; - GOOGLE_VPD = module; } // lib.optionalAttrs From 409317adb30b74fbf552294eae3760f2bbb85283 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 17 Dec 2025 19:08:38 +0100 Subject: [PATCH 04/10] linux/common-config: fix for Linux 5.10.y on aarch64 Until 5.15, HYPERV only supports x86, so forcing module broke configuration of 5.10 on aarch64. Our kernel configuration script sets every module it can to "m" anyway, so it was redundant and breakage-prone to set any value here for pre-6.18. I've confiremd that HYPERV is still set to "m" on 6.12 after this change. Fixes: e9b977bc41dc ("linux/common-config: update for 6.18") --- pkgs/os-specific/linux/kernel/common-config.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 5f285fa3eb5f..c41023c8cd4d 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -567,10 +567,7 @@ let (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux") { # Enable Hyper-V guest stuff - HYPERV = lib.mkMerge [ - (whenOlder "6.18" module) - (whenAtLeast "6.18" yes) - ]; + HYPERV = whenAtLeast "6.18" yes; # Enable Hyper-V Synthetic DRM Driver DRM_HYPERV = whenAtLeast "5.14" module; # And disable the legacy framebuffer driver when we have the new one From 8c9283d617563599a54082940b7735acea2789b0 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 17 Dec 2025 19:21:05 +0100 Subject: [PATCH 05/10] linux/common-config: enable FUNCTION_GRAPH_RETVAL Enables recording return values of functions with ftrace. Already enabled by Fedora. --- pkgs/os-specific/linux/kernel/common-config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 5f285fa3eb5f..d026c6107fe0 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -931,6 +931,7 @@ let BPF_EVENTS = yes; FUNCTION_PROFILER = yes; RING_BUFFER_BENCHMARK = no; + FUNCTION_GRAPH_RETVAL = whenAtLeast "6.5" yes; }; perf = { From 6b6c8b140268f092e1fbc66fe7b6d122009ac3cb Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 18 Dec 2025 17:46:11 +0300 Subject: [PATCH 06/10] linux/common-config: explicitly select RUST_FW_LOADER_ABSTRACTIONS for now --- pkgs/os-specific/linux/kernel/common-config.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 1687e8ee8226..28e640404ba1 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -561,6 +561,10 @@ let # Enable CEC over DisplayPort DRM_DP_CEC = whenOlder "6.10" yes; DRM_DISPLAY_DP_AUX_CEC = whenAtLeast "6.10" yes; + + # Required for Nova + # FIXME: remove after https://gitlab.freedesktop.org/drm/rust/kernel/-/commit/3d3352e73a55a4ccf110f8b3419bbe2fbfd8a030 lands + RUST_FW_LOADER_ABSTRACTIONS = whenAtLeast "6.12" yes; } // lib.optionalAttrs From 864081696f1e21bf0f86fc9787aab4c1711c3914 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 18 Dec 2025 17:43:54 +0300 Subject: [PATCH 07/10] linux_testing: 6.18-rc7 -> 6.19-rc1 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 1fc12f5f0ad8..b657ca25be6f 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -1,7 +1,7 @@ { "testing": { - "version": "6.18-rc7", - "hash": "sha256:03k1kj4bqg3bn0p4lzkbz0yqj1p50v2yr94lrld8rrkbwdawxx3r", + "version": "6.19-rc1", + "hash": "sha256:1jfcm4m2xbglirn8qdvhb3675fln9cjfva3v9hhs6a4qqqx2396f", "lts": false }, "6.1": { From 402ad0fff048992ac002f3857d9350e1399b781a Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 18 Dec 2025 17:28:09 +0300 Subject: [PATCH 08/10] linux_6_18: 6.18.1 -> 6.18.2 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index b657ca25be6f..d0f7b5adfc17 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -35,8 +35,8 @@ "lts": false }, "6.18": { - "version": "6.18.1", - "hash": "sha256:1m955svk1sfmhpw5wpkhg1dpnxmwsnpdqnivmw8alaniy3rqp9yh", + "version": "6.18.2", + "hash": "sha256:0smrmbnlhfivw2kx689wd52aff80gf0gw9wqz4s2nja9nyx6p32m", "lts": false } } From 52e64396e98aef211f4127416dbdae17a01b3d3f Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 18 Dec 2025 17:28:11 +0300 Subject: [PATCH 09/10] linux_6_17: 6.17.12 -> 6.17.13 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index d0f7b5adfc17..77a2ec567486 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -30,8 +30,8 @@ "lts": true }, "6.17": { - "version": "6.17.12", - "hash": "sha256:1mlqirjzyx3zvvm87gf7slj2d5gdpp13vw91dgbfk54iz6b08y22", + "version": "6.17.13", + "hash": "sha256:1fgdy9j90yfd4c2yqdciasdhda14pbfrpzkgriin2r6i7bf04s0i", "lts": false }, "6.18": { From b01ca3bca3af924e09ad3c59e52df993dd44d1a9 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 18 Dec 2025 17:28:15 +0300 Subject: [PATCH 10/10] linux_6_12: 6.12.62 -> 6.12.63 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 77a2ec567486..6672d00ec7b4 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -25,8 +25,8 @@ "lts": true }, "6.12": { - "version": "6.12.62", - "hash": "sha256:04rcnr7bgrqqfj62l31mxx553bjdalr5f46xjbcmvawgmj2wdqhk", + "version": "6.12.63", + "hash": "sha256:1cvxvwlmnqw71nf6nizf0hpp710a8dsczz5bjwy3i55qwkzwa0lm", "lts": true }, "6.17": {