From 25208eeaba9e009a8248d1f720d1d5cc130dd05a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 4 Apr 2021 14:55:56 +0000 Subject: [PATCH] linux: remove xen_dom0 feature entirely Xen is now enabled unconditionally on kernels that support it, so the xen_dom0 feature doesn't do anything. The isXen attribute will now produce a deprecation warning and unconditionally return true. Passing in a custom value for isXen is no longer supported. --- nixos/modules/virtualisation/xen-dom0.nix | 3 --- pkgs/os-specific/linux/kernel/generic.nix | 5 ++--- pkgs/os-specific/linux/kernel/manual-config.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index 5b57ca860da..b649d64be3c 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -161,9 +161,6 @@ in environment.systemPackages = [ cfg.package ]; - # Make sure Domain 0 gets the required configuration - #boot.kernelPackages = pkgs.boot.kernelPackages.override { features={xen_dom0=true;}; }; - boot.kernelModules = [ "xen-evtchn" "xen-gntdev" "xen-gntalloc" "xen-blkback" "xen-netback" "xen-pciback" "evtchn" "gntdev" "netbk" "blkbk" "xen-scsibk" diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index ac9d6fbb2b5..4518b5a336b 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -46,7 +46,6 @@ stdenv.hostPlatform != stdenv.buildPlatform , extraMeta ? {} -, isXen ? features.xen_dom0 or false , isZen ? false , isLibre ? false , isHardened ? false @@ -74,7 +73,6 @@ let needsCifsUtils = true; netfilterRPFilter = true; grsecurity = false; - xen_dom0 = false; ia32Emulation = true; } // features) kernelPatches; @@ -178,7 +176,8 @@ let passthru = { features = kernelFeatures; - inherit commonStructuredConfig isXen isZen isHardened isLibre; + inherit commonStructuredConfig isZen isHardened isLibre; + isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; kernelOlder = lib.versionOlder version; kernelAtLeast = lib.versionAtLeast version; passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]); diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 2fc63322f5b..e45b21ff35f 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -37,7 +37,6 @@ in { extraMeta ? {}, # for module compatibility - isXen ? features.xen_dom0 or false, isZen ? false, isLibre ? false, isHardened ? false, @@ -94,7 +93,8 @@ let passthru = { inherit version modDirVersion config kernelPatches configfile moduleBuildDependencies stdenv; - inherit isXen isZen isHardened isLibre; + inherit isZen isHardened isLibre; + isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; kernelOlder = lib.versionOlder version; kernelAtLeast = lib.versionAtLeast version; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ca19cb30c0..4fab58b566b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19777,7 +19777,7 @@ in inherit (kernel) stdenv; # in particular, use the same compiler by default # to help determine module compatibility - inherit (kernel) isXen isZen isHardened isLibre; + inherit (kernel) isZen isHardened isLibre; inherit (kernel) kernelOlder kernelAtLeast; # Obsolete aliases (these packages do not depend on the kernel).