From 977f1efbb443109164fe678e666f0dace8fb2af2 Mon Sep 17 00:00:00 2001 From: IgnoreWarnings Date: Thu, 8 Aug 2024 17:53:19 +0000 Subject: [PATCH] ensure loading of vfio modules Signed-off-by: IgnoreWarnings --- fpga/lib/pcie_card.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fpga/lib/pcie_card.cpp b/fpga/lib/pcie_card.cpp index 5bd58c0ce..fc326c658 100644 --- a/fpga/lib/pcie_card.cpp +++ b/fpga/lib/pcie_card.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,10 @@ PCIeCardFactory::make(json_t *json_card, std::string card_name, const std::filesystem::path &searchPath) { auto logger = getStaticLogger(); + // make sure the vfio container has the required modules + kernel::loadModule("vfio_pcie"); + kernel::loadModule("vfio_iommu_type1"); + json_t *json_ips = nullptr; json_t *json_paths = nullptr; const char *pci_slot = nullptr;