From 2d79441aa05c5872ac54f47edbf7c3166306c824 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Thu, 24 Jul 2025 13:22:00 +0200 Subject: [PATCH] fix(fpga): improve error message when we we are unable to rewrite the BAR Signed-off-by: Niklas Eiling --- common/lib/kernel/vfio_container.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/lib/kernel/vfio_container.cpp b/common/lib/kernel/vfio_container.cpp index cf30f29bd..8857a9352 100644 --- a/common/lib/kernel/vfio_container.cpp +++ b/common/lib/kernel/vfio_container.cpp @@ -214,8 +214,9 @@ std::shared_ptr Container::attachDevice(devices::PciDevice &pdev) { e.what() + std::string( "\nBAR of device is in inconsistent state. Rewriting the BAR " - "failed. Please remove, rescan and reset the device and " - "try again.")); + "failed. This can happend due to missing privileges or bad device " + "state. Consider running with root privileges or remove, rescan " + "and reset the device.")); } // Get IOMMU group of device