Skip to content

Commit

Permalink
usertools/devbind: support all VFIO no-IOMMU sysfs values
Browse files Browse the repository at this point in the history
This patch adds support for 'y' and 'Y' values when reading
vfio-pci unsafe_noiommu_mode flag.

Possible values were taken from linux kernel
(sysfs__read_bool() in tools/lib/api/fs/fs.c)

Signed-off-by: Rogelio Domínguez Hernández <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
  • Loading branch information
rogeliodh authored and tmonjalo committed Nov 19, 2024
1 parent 0e95a67 commit c77887a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,7 @@ Robin Jarry <[email protected]> <[email protected]>
Robin Zhang <[email protected]>
Rob Miller <[email protected]>
Rob Scheepens <[email protected]>
Rogelio Domínguez Hernández <[email protected]>
Roger Melton <[email protected]>
Rohit Raj <[email protected]>
Roland Qi <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion usertools/dpdk-devbind.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ def check_noiommu_mode():

try:
with open(filename, "r") as f:
if f.read(1) == "1":
value = f.read(1)
if value in ("1", "y" ,"Y"):
return
except OSError as err:
sys.exit(f"Error: failed to check unsafe noiommu mode - Cannot open {filename}: {err}")
Expand Down

0 comments on commit c77887a

Please sign in to comment.