From 66be3121beec09a41b86feaed85efc94cd4ddab1 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 14 Jan 2025 10:37:48 +0100 Subject: [PATCH] cloud-hypervisor: backport UB fix in kvm-ioctls VFIO is broken on x86_64 as a result of UB in kvm-ioctls with LLVM 19, which is currently in staging-next. This backports the fix. --- pkgs/by-name/cl/cloud-hypervisor/package.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/cl/cloud-hypervisor/package.nix b/pkgs/by-name/cl/cloud-hypervisor/package.nix index 546d0e231b786..322ab3b48c426 100644 --- a/pkgs/by-name/cl/cloud-hypervisor/package.nix +++ b/pkgs/by-name/cl/cloud-hypervisor/package.nix @@ -20,8 +20,16 @@ rustPlatform.buildRustPackage rec { hash = "sha256-drxJtlvBpkK3I7Ob3+pH4KLUq53GWXe1pmv7CI3bbP4="; }; + cargoPatches = [ + (fetchpatch { + name = "kvm-ioctls-0.19.1.patch"; + url = "https://github.com/cloud-hypervisor/cloud-hypervisor/commit/eaa21946993276434403d41419a34e564935c8e9.patch"; + hash = "sha256-G7B0uGl/RAkwub8x1jNNgBrC0dwq/Gv46XpbtTZWD5M="; + }) + ]; + useFetchCargoVendor = true; - cargoHash = "sha256-wifctp30ApnxtRMlzksoSGrIJUT1cB0p1RBxfyITuZI="; + cargoHash = "sha256-F6ukvSwMHRHXoZKgXEFnTAN1B80GsQDW8iqZAvsREr4="; separateDebugInfo = true;