1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/common/include/villas/kernel/vfio.hpp
IgnoreWarnings d73663bb01 Kernel module loading system and bug fixes of vfio (#110)
- feature: Header to specify which kernel modules (vfio support) to load
- Bug fixes: wrong errror messages, bugged region cap
- Quality of use improvements e.g. getter and str()

---------

Signed-off-by: IgnoreWarnings <pascal.bauer@rwth-aachen.de>
Signed-off-by: IgnoreWarnings <119685519+IgnoreWarnings@users.noreply.github.com>
Co-authored-by: Steffen Vogel <steffen.vogel@opal-rt.com>
2024-02-29 18:58:07 +01:00

34 lines
No EOL
932 B
C++

/** VFIO Kernel module loader
*
* Author: Pascal Bauer <pascal.bauer@rwth-aachen.de>
* SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University
* SPDX-License-Identifier: Apache-2.0
*********************************************************************************/
//TODO: Move to cmake args
//#define FPGA_PLATFORM
#define FPGA_PCI
#if defined(FPGA_PLATFORM)
#define KERNEL_MODULE_VFIO
#endif
#if defined(FPGA_PCI)
#define KERNEL_MODULE_VFIO
#define KERNEL_MODULE_VFIO_PCI
#define KERNEL_MODULE_VFIO_IOMMU_TYPE1
#endif
static constexpr const char* const requiredKernelModules[] = {
#if defined(KERNEL_MODULE_VFIO)
"vfio",
#endif // KERNEL_MODULE_VFIO_PCI
#if defined(KERNEL_MODULE_VFIO_PCI)
"vfio_pci",
#endif // KERNEL_MODULE_VFIO_PCI
#if defined(KERNEL_MODULE_VFIO_IOMMU_TYPE1)
"vfio_iommu_type1"
#endif // KERNEL_MODULE_VFIO_IOMMU_TYPE1
};