summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-01 17:30:29 +0000
committerAlyssa Ross <hi@alyssa.is>2021-04-14 23:35:22 +0000
commit12a0b52ebb5101f9bb436a764c1ebf3d730db528 (patch)
tree332707517689994d592ff121bb6067d81e4c32de /pkgs/os-specific
parent10ef397830d68c764dc24e833682d01c08fe55ab (diff)
downloadnixpkgs-12a0b52ebb5101f9bb436a764c1ebf3d730db528.tar
nixpkgs-12a0b52ebb5101f9bb436a764c1ebf3d730db528.tar.gz
nixpkgs-12a0b52ebb5101f9bb436a764c1ebf3d730db528.tar.bz2
nixpkgs-12a0b52ebb5101f9bb436a764c1ebf3d730db528.tar.lz
nixpkgs-12a0b52ebb5101f9bb436a764c1ebf3d730db528.tar.xz
nixpkgs-12a0b52ebb5101f9bb436a764c1ebf3d730db528.tar.zst
nixpkgs-12a0b52ebb5101f9bb436a764c1ebf3d730db528.zip
linux: enable Xen everywhere it can be
I don't think there's any reason to have a seperate kernel variant
because of this, with all the maintenance burden that imposes.  Debian
and Fedora both enable all these options on their normal kernels.

Alias the Linux Xen attributes, so this change should be seemless for
people who were using the Xen kernels up to now.

All the Xen options are marked as optional anyway, so it should be
fine to try to enable them on non-x86 platforms as well.

Cherry-picking this for Spectrum because PVH is cloud-hypervisor's
preferred boot entry point on x86, and it'll complain if our kernel
doesn't support it.

Fixes: https://github.com/NixOS/nixpkgs/issues/115182

(cherry picked from commit 5f24024de6f6405bb9ae9fc4c960b3fba84613b9)

Message-Id: <20210411115740.29615-2-hi@alyssa.is>
Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix13
1 files changed, 4 insertions, 9 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index e80e29aad3d..c0da19dd391 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -12,7 +12,7 @@
 # Configuration
 { stdenv, version
 
-, features ? { grsecurity = false; xen_dom0 = false; }
+, features ? { grsecurity = false; }
 }:
 
 with stdenv.lib;
@@ -505,13 +505,8 @@ let
       VBOXGUEST = option no;
       DRM_VBOXVIDEO = option no;
 
-    } // optionalAttrs (stdenv.isx86_64 || stdenv.isi686) ({
-      XEN = option yes;
-
-      # XXX: why isn't this in the xen-dom0 conditional section below?
-      XEN_DOM0 = option yes;
-
-    } // optionalAttrs features.xen_dom0 {
+      XEN                         = option yes;
+      XEN_DOM0                    = option yes;
       PCI_XEN                     = option yes;
       HVC_XEN                     = option yes;
       HVC_XEN_FRONTEND            = option yes;
@@ -530,7 +525,7 @@ let
       XEN_SELFBALLOONING          = option yes;
       XEN_STUB                    = option yes;
       XEN_TMEM                    = option yes;
-    });
+    };
 
     media = {
       MEDIA_DIGITAL_TV_SUPPORT = yes;