mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
vfio: fix group not being set as attached
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
b135a4c027
commit
bd1a7d7538
2 changed files with 4 additions and 3 deletions
|
@ -46,8 +46,6 @@ Container::Container() :
|
|||
groups(),
|
||||
log(logging.get("kernel:vfio::Container"))
|
||||
{
|
||||
spdlog::set_level(spdlog::level::debug);
|
||||
|
||||
static constexpr const char* requiredKernelModules[] = {
|
||||
"vfio", "vfio_pci", "vfio_iommu_type1"
|
||||
};
|
||||
|
@ -127,6 +125,9 @@ void Container::attachGroup(std::shared_ptr<Group> group)
|
|||
log->error("Failed to set IOMMU type of container: {}", ret);
|
||||
throw RuntimeError("Failed to set IOMMU type of container");
|
||||
}
|
||||
|
||||
group->setAttachedToContainer();
|
||||
|
||||
if (!group->checkStatus())
|
||||
throw RuntimeError("bad VFIO group status for group {}.", group->getIndex());
|
||||
else
|
||||
|
|
|
@ -83,7 +83,7 @@ bool Group::checkStatus()
|
|||
{
|
||||
int ret;
|
||||
if (!attachedToContainer) {
|
||||
log->debug("Group {} is not attached to a container", index);
|
||||
log->error("Group {} is not attached to a container", index);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue