Skip to content

Instantly share code, notes, and snippets.

@Jacobboogiebear
Last active May 14, 2024 21:09
Show Gist options
  • Save Jacobboogiebear/2ed23b923213e9f75a9a1f202675de27 to your computer and use it in GitHub Desktop.
Save Jacobboogiebear/2ed23b923213e9f75a9a1f202675de27 to your computer and use it in GitHub Desktop.
kernel patch for KVM on Windows WSL2
cp Microsoft/config-wsl .config
sed -i 's/# CONFIG_KVM_GUEST is not set/CONFIG_KVM_GUEST=y/g' .config
sed -i 's/# CONFIG_ARCH_CPUIDLE_HALTPOLL is not set/CONFIG_ARCH_CPUIDLE_HALTPOLL=y/g' .config
sed -i 's/# CONFIG_HYPERV_IOMMU is not set/CONFIG_HYPERV_IOMMU=y/g' .config
sed -i '/^# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set/a CONFIG_PARAVIRT_CLOCK=y' .config
sed -i '/^# CONFIG_CPU_IDLE_GOV_TEO is not set/a CONFIG_CPU_IDLE_GOV_HALTPOLL=y' .config
sed -i '/^CONFIG_CPU_IDLE_GOV_HALTPOLL=y/a CONFIG_HALTPOLL_CPUIDLE=y' .config
sed -i 's/CONFIG_HAVE_ARCH_KCSAN=y/CONFIG_HAVE_ARCH_KCSAN=n/g' .config
sed -i '/^CONFIG_HAVE_ARCH_KCSAN=n/a CONFIG_KCSAN=n' .config
make -j 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment