package: add kernel packages for kvm virtualization
[openwrt/openwrt.git] / package / kernel / linux / modules / virt.mk
1 #
2 # Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 define KernelPackage/vhost_net
8 SUBMENU:=Virtualization
9 TITLE:=Host kernel accelerator for virtio net
10 DEPENDS:=
11 KCONFIG:=CONFIG_VHOST_NET
12 FILES:= $(LINUX_DIR)/drivers/vhost/vhost_net.ko
13 AUTOLOAD:=$(call AutoProbe,vhost_net.ko)
14 endef
15
16 define KernelPackage/vhost_net/description
17 This kernel module can be loaded in host kernel to accelerate
18 guest networking with virtio_net. Not to be confused with virtio_net
19 module itself which needs to be loaded in guest kernel.
20 endef
21
22 $(eval $(call KernelPackage,vhost_net))
23
24
25 define KernelPackage/irqbypass
26 SUBMENU:=Virtualization
27 TITLE:=IRQ offload/bypass manager
28 KCONFIG:=CONFIG_IRQ_BYPASS_MANAGER
29 FILES:= $(LINUX_DIR)/virt/lib/irqbypass.ko
30 AUTOLOAD:=$(call AutoProbe,irqbypass.ko)
31 endef
32
33 define KernelPackage/irqbypass/description
34 Various virtualization hardware acceleration techniques allow bypassing or
35 offloading interrupts received from devices around the host kernel. Posted
36 Interrupts on Intel VT-d systems can allow interrupts to be received
37 directly by a virtual machine. ARM IRQ Forwarding allows forwarded physical
38 interrupts to be directly deactivated by the guest. This manager allows
39 interrupt producers and consumers to find each other to enable this sort of
40 bypass.
41 endef
42
43 $(eval $(call KernelPackage,irqbypass))
44
45
46 define KernelPackage/kvm-x86
47 SUBMENU:=Virtualization
48 TITLE:=Kernel-based Virtual Machine (KVM) support
49 DEPENDS:=@TARGET_x86 +kmod-irqbypass
50 KCONFIG:=\
51 CONFIG_VIRTUALIZATION=y \
52 CONFIG_KVM \
53 CONFIG_VHOST_NET=n \
54 CONFIG_VHOST_CROSS_ENDIAN_LEGACY=n \
55 CONFIG_TASK_XACCT=n \
56
57 FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm.ko
58 AUTOLOAD:=$(call AutoProbe,kvm.ko)
59 endef
60
61 define KernelPackage/kvm-x86/description
62 Support hosting fully virtualized guest machines using hardware
63 virtualization extensions. You will need a fairly recent
64 processor equipped with virtualization extensions. You will also
65 need to select one or more of the processor modules.
66
67 This module provides access to the hardware capabilities through
68 a character device node named /dev/kvm.
69 endef
70
71 $(eval $(call KernelPackage,kvm-x86))
72
73
74 define KernelPackage/kvm-intel
75 SUBMENU:=Virtualization
76 TITLE:=KVM for Intel processors support
77 DEPENDS:=@TARGET_x86 +kmod-kvm-x86
78 KCONFIG:=CONFIG_KVM_INTEL CONFIG_KVM_AMD=n
79 FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-intel.ko
80 AUTOLOAD:=$(call AutoProbe,kvm-intel.ko)
81 endef
82
83 define KernelPackage/kvm-intel/description
84 Provides support for KVM on Intel processors equipped with the VT
85 extensions.
86 endef
87
88 $(eval $(call KernelPackage,kvm-intel))
89
90
91 define KernelPackage/kvm-amd
92 SUBMENU:=Virtualization
93 TITLE:=KVM for AMD processors support
94 DEPENDS:=@TARGET_x86 +kmod-kvm-x86
95 KCONFIG:=CONFIG_KVM_INTEL=n CONFIG_KVM_AMD
96 FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-amd.ko
97 AUTOLOAD:=$(call AutoProbe,kvm-amd.ko)
98 endef
99
100 define KernelPackage/kvm-amd/description
101 Provides support for KVM on AMD processors equipped with the AMD-V
102 (SVM) extensions.
103 endef
104
105 $(eval $(call KernelPackage,kvm-amd))