From f155a35d7d8562b1da40a7e0b4265829d54455bd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Aug 2013 14:01:59 +0200 Subject: [PATCH] Move kernelExtraConfig to common-config.nix (for x86) It's bad to have the kernel config scattered across two places. (This should also be done for the other architectures.) Also, restore Xen and KVM guest support in Linux 3.10. --- pkgs/os-specific/linux/kernel/common-config.nix | 15 +++++++++++++++ pkgs/top-level/platforms.nix | 13 ------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index cc9be98c838..0c3aca17e4e 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -265,7 +265,22 @@ with stdenv.lib; ''} # Virtualisation. + PARAVIRT y + ${if versionAtLeast version "3.10" then '' + HYPERVISOR_GUEST y + '' else '' + PARAVIRT_GUEST y + ''} + KVM_GUEST y + ${optionalString (versionOlder version "3.7") '' + KVM_CLOCK y + ''} + XEN y XEN_DOM0? y + KSM y + ${optionalString (!stdenv.is64bit) '' + HIGHMEM64G? y # We need 64 GB (PAE) support for Xen guest support. + ''} # Media support. ${optionalString (versionAtLeast version "3.6") '' diff --git a/pkgs/top-level/platforms.nix b/pkgs/top-level/platforms.nix index ec047efecb0..d6408286581 100644 --- a/pkgs/top-level/platforms.nix +++ b/pkgs/top-level/platforms.nix @@ -10,19 +10,6 @@ rec { # Currently ignored - it should be set according to 'system' once it is # not ignored. This is for stdenv-updates. kernelArch = "i386"; - kernelExtraConfig = - '' - # Virtualisation (KVM, Xen...). - HYPERVISOR_GUEST? y #3.10 version of the paravirt options - PARAVIRT_GUEST? y #Doesn't exist in 3.10 - KVM_CLOCK? y #Part of KVM_GUEST since linux 3.7 - KVM_GUEST? y #Doesn't exist in 3.10 - XEN? y #Doesn't exist in 3.10 - KSM y - - # We need 64 GB (PAE) support for Xen guest support. - HIGHMEM64G? y - ''; }; pc_simplekernel = pc // {