From f63f6046bc6fdb9e5375bd54bc52d552deee2709 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 2 Dec 2025 11:57:29 +0300 Subject: [PATCH] linux/common-config: build hyperv stuff on aa64 (cherry picked from commit 03fd6a2069a4bfd16fe0938bd2ccbd9a679f6d4b) --- .../linux/kernel/common-config.nix | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index cb0535c79652..7b1cba208428 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -554,19 +554,24 @@ let DRM_DP_CEC = whenOlder "6.10" yes; DRM_DISPLAY_DP_AUX_CEC = whenAtLeast "6.10" yes; } + // + lib.optionalAttrs + (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) + ]; + # Enable Hyper-V Synthetic DRM Driver + DRM_HYPERV = whenAtLeast "5.14" module; + # And disable the legacy framebuffer driver when we have the new one + FB_HYPERV = whenAtLeast "5.14" no; + } // lib.optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") { # Intel GVT-g graphics virtualization supports 64-bit only DRM_I915_GVT = yes; DRM_I915_GVT_KVMGT = module; - # Enable Hyper-V guest stuff - HYPERV = lib.mkMerge [ - (whenOlder "6.18" module) - (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 - FB_HYPERV = whenAtLeast "5.14" no; } // lib.optionalAttrs (stdenv.hostPlatform.system == "aarch64-linux") { # enable HDMI-CEC on RPi boards