aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicola Corna <nicola@corna.info>2022-08-20 21:41:59 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2022-09-21 13:06:10 +0200
commitf089f7373e428daf37fc8b4a904565c8fe8c6305 (patch)
treef2b17cdf38e3d448bb44e7aac369731c9cf5268f
parent8fea4a102ccd57e8c79d76d13f92d7516ec7b50f (diff)
downloadupstream-f089f7373e428daf37fc8b4a904565c8fe8c6305.tar.gz
upstream-f089f7373e428daf37fc8b4a904565c8fe8c6305.tar.bz2
upstream-f089f7373e428daf37fc8b4a904565c8fe8c6305.zip
kernel: add VFIO kernel packages
Add kmod-vfio and kmod-vfio-pci packages. Signed-off-by: Nicola Corna <nicola@corna.info>
-rw-r--r--package/kernel/linux/modules/virt.mk43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/kernel/linux/modules/virt.mk b/package/kernel/linux/modules/virt.mk
index 5ed0d5dbbf..59a2d79563 100644
--- a/package/kernel/linux/modules/virt.mk
+++ b/package/kernel/linux/modules/virt.mk
@@ -72,3 +72,46 @@ define KernelPackage/kvm-amd/description
endef
$(eval $(call KernelPackage,kvm-amd))
+
+
+define KernelPackage/vfio
+ SUBMENU:=Virtualization
+ TITLE:=VFIO Non-Privileged userspace driver framework
+ DEPENDS:=@TARGET_x86_64
+ KCONFIG:= \
+ CONFIG_VFIO \
+ CONFIG_VFIO_NOIOMMU=n \
+ CONFIG_VFIO_MDEV=n
+ FILES:= \
+ $(LINUX_DIR)/drivers/vfio/vfio.ko \
+ $(LINUX_DIR)/drivers/vfio/vfio_virqfd.ko \
+ $(LINUX_DIR)/drivers/vfio/vfio_iommu_type1.ko
+ AUTOLOAD:=$(call AutoProbe,vfio vfio_iommu_type1 vfio_virqfd)
+endef
+
+define KernelPackage/vfio/description
+ VFIO provides a framework for secure userspace device drivers.
+endef
+
+$(eval $(call KernelPackage,vfio))
+
+
+define KernelPackage/vfio-pci
+ SUBMENU:=Virtualization
+ TITLE:=Generic VFIO support for any PCI device
+ DEPENDS:=@TARGET_x86_64 @PCI_SUPPORT +kmod-vfio +kmod-irqbypass
+ KCONFIG:= \
+ CONFIG_VFIO_PCI \
+ CONFIG_VFIO_PCI_IGD=y
+ FILES:= \
+ $(LINUX_DIR)/drivers/vfio/pci/vfio-pci-core.ko@ge5.15 \
+ $(LINUX_DIR)/drivers/vfio/pci/vfio-pci.ko
+ AUTOLOAD:=$(call AutoProbe,vfio-pci)
+endef
+
+define KernelPackage/vfio-pci/description
+ Support for the generic PCI VFIO bus driver which can connect any PCI
+ device to the VFIO framework.
+endef
+
+$(eval $(call KernelPackage,vfio-pci))