{"id":16494533,"url":"https://github.com/portellam/parse-iommu-devices","last_synced_at":"2025-10-11T14:12:30.037Z","repository":{"id":252907273,"uuid":"841872348","full_name":"portellam/parse-iommu-devices","owner":"portellam","description":"Bash script to parse, sort, and display hardware devices by IOMMU group, and return the device drivers and hardware IDs as output.","archived":false,"fork":false,"pushed_at":"2025-05-05T19:46:02.000Z","size":276,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T20:45:48.809Z","etag":null,"topics":["bash","iommu","linux","script","vfio"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/portellam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-13T08:03:40.000Z","updated_at":"2025-05-05T19:46:05.000Z","dependencies_parsed_at":"2024-09-16T18:09:08.907Z","dependency_job_id":"2b78791d-3b77-4424-9487-6e6d074c6e8f","html_url":"https://github.com/portellam/parse-iommu-devices","commit_stats":null,"previous_names":["portellam/parse-iommu-devices"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/portellam/parse-iommu-devices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portellam%2Fparse-iommu-devices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portellam%2Fparse-iommu-devices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portellam%2Fparse-iommu-devices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portellam%2Fparse-iommu-devices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/portellam","download_url":"https://codeload.github.com/portellam/parse-iommu-devices/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portellam%2Fparse-iommu-devices/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007499,"owners_count":26084313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","iommu","linux","script","vfio"],"created_at":"2024-10-11T14:14:15.222Z","updated_at":"2025-10-11T14:12:30.030Z","avatar_url":"https://github.com/portellam.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parse IOMMU Devices\n### v1.0.3\nBash script to parse, sort, and display hardware devices by IOMMU group,\nand return the device drivers and hardware IDs as output.\n\n### [Download](#5-download)\n#### View this repository on [Codeberg][01] or [GitHub][02].\n[01]: https://codeberg.org/portellam/parse-iommu-devices\n[02]: https://github.com/portellam/parse-iommu-devices\n##\n\n## Table of Contents\n- [1. Why?](#1-why)\n- [2. Related Projects](#2-related-projects)\n- [3. Documentation](#3-documentation)\n- [4. Host Requirements](#4-host-requirements)\n- [5. Download](#5-download)\n- [6. Usage](#6-usage)\n    - [6.1. Install](#61-install)\n    - [6.2. Executable](#62-executable)\n    - [6.3 Parse standard output for automation or other scripts](#63-parse-standard-output-for-automation-or-other-scripts)\n- [7. Contact](#7-contact)\n- [8. References](#8-references)\n- [9. Planned Features](#9-planned-features)\n\n## Contents\n### 1. Why?\n**Do you want to know if your current machine is able to support VFIO?** then you\nneed *Parse IOMMU Devices*.\n\nThe script allows the user to query the exact hardware the user wishes to allocate\nfor a VFIO setup. After which, the script returns the relevant standard output.\n\nThe standard output may be used for kernel command line arguments, for example.\nSee [6. Usage](#6-usage) for details on how to best use standard output.\n\n#### Disclaimer\nFor first-time use, the script must be run **without** a VFIO setup present.\n\nAn existing VFIO setup will cause selected devices to use the VFIO driver\n(`vfio-pci` or sometimes `pci-stub`). **The script will skip any IOMMU groups**\n**with at least one (1) device binded to VFIO.**\n\n### 2. Related Projects\nTo view other relevant projects, visit [Codeberg][21]\nor [GitHub][22].\n\n[21]: https://codeberg.org/portellam/vfio-collection\n[22]: https://github.com/portellam/vfio-collection\n\n### 3. Documentation\n- What is VFIO?[\u003csup\u003e[2]\u003c/sup\u003e](#2)\n- VFIO Discussion and Support[\u003csup\u003e[3]\u003c/sup\u003e](#3)\n- Hardware-Passthrough Guide[\u003csup\u003e[1]\u003c/sup\u003e](#1)\n- Virtual Machine XML Format Guide[\u003csup\u003e[4]\u003c/sup\u003e](#4)\n\n### 4. Host Requirements\nLinux.\n\n## 5. Download\n- Download the Latest Release:\u0026ensp;[Codeberg][51] or [GitHub][52].\n\n- Download the `.zip` file:\n    1. Viewing from the top of the repository's (current) webpage, click the\n        drop-down icon:\n        - `···` on Codeberg.\n        - `\u003c\u003e Code ` on GitHub.\n    2. Click `Download ZIP` and save.\n    3. Open the `.zip` file, then extract its contents.\n\n- Clone the repository:\n    1. Open a Command Line Interface (CLI) or Terminal.\n        - Open a console emulator (for Debian systems: Konsole).\n        - **Linux only:** Open an existing console: press `CTRL` + `ALT` + `F2`,\n        `F3`, `F4`, `F5`, or `F6`.\n            - **To return to the desktop,** press `CTRL` + `ALT` + `F7`.\n            - `F1` is reserved for debug output of the Linux kernel.\n            - `F7` is reserved for video output of the desktop environment.\n            - `F8` and above are unused.\n    2. Change your directory to your home folder or anywhere safe:\n        - `cd ~`\n    3. Clone the repository:\n        - `git clone https://www.codeberg.org/portellam/parse-iommu-devices`\n        - `git clone https://www.github.com/portellam/parse-iommu-devices`\n\n[51]: https://codeberg.org/portellam/parse-iommu-devices/releases/latest\n[52]: https://github.com/portellam/parse-iommu-devices/releases/latest\n\n### 6. Usage\n#### 6.1. Install\nInstaller will copy the script file to `/usr/local/bin/`, and source files to\n`/usr/local/bin/parse-iommu-devices.d/`.\n\n```bash\nsudo bash installer.sh\n```\n\n#### 6.2. Executable\n- From anywhere, execute: `parse-iommu-devices`\n\n```\n  -h, --help                Print this help and exit.\n  -v, --verbose             Show more output including queries and IOMMU\n                            groups.\n\n  -vv                       Show all output.\n  -g, --group=GROUPS        Match IOMMU group ID(s);\n                            GROUPS is a comma delimited list of positive\n                            numbers.\n\n  --ignore-group=GROUPS     Reverse match IOMMU group ID(s);\n                            GROUPS is a comma delimited list of positive\n                            numbers.\n\n  -G, --graphics=INDEX      Match all IOMMU groups without a graphics\n                            device, and any IOMMU group (with a graphics\n                            device) whose INDEX matches the expected\n                            INDEX value(s). INDEX is not an IOMMU group\n                            ID;\n                            INDEX is a comma delimited list of postive\n                            non-zero numbers.\n\n  -H, --host                Match IOMMU groups with at least one (1) or\n                            more Host devices.\n\n  -n, --name=NAME           Match IOMMU group(s) with device name;\n                            NAME is a comma delimited list of text.\n\n  --ignore-name=NAME        Reverse match IOMMU group(s) with device name;\n                            NAME is a comma delimited list of text.\n\n  -t, --type=TYPE           Match IOMMU group(s) with device type;\n                            TYPE is a comma delimited list of text.\n\n  --ignore-type=TYPE        Reverse match IOMMU group(s) with device type;\n                            TYPE is a comma delimited list of text.\n\n  -V, --vendor=VENDOR       Match IOMMU group(s) with device vendor;\n                            VENDOR is a comma delimited list of text.\n\n  --ignore-vendor=VENDOR    Reverse match IOMMU group(s) with device vendor;\n\nExamples:\n  parse-iommu-devices --graphics 2,3\n                            Include the second and third matched IOMMU\n                            groups with graphics device(s). Standard\n                            output includes: comma-delimited lists of\n                            selected hardware IDs, drivers, and IOMMU\n                            group IDs.\n\n  parse-iommu-devices -vv --ignore-name ether --pcie\n                            Match output of IOMMU groups with PCI/e\n                            devices, and exclude any wired ethernet\n                            devices. Verbose output includes:\n                            comma-delimited lists of selected hardware\n                            IDs, drivers, and IOMMU group IDs; details of\n                            all IOMMU groups; and telemetry.\n```\n\n### 6.3 Parse standard output for automation or other scripts\nTo retrieve standard output, execute the following with the options of your choice,\nbut **without** a verbose flag.\n\n1. **Hardware ID** list:\n```bash\n  parse-iommu-devices | sed --quiet 1p\n```\n\n2. **Driver** list:\n```bash\n  parse-iommu-devices | sed --quiet 2p\n```\n\n3. **IOMMU group ID** list:\n```bash\n  parse-iommu-devices | sed --quiet 3p\n```\n\n### 7. Contact\nDo you need help? Please visit the [Issues][71] page.\n\n[71]: https://github.com/portellam/parse-iommu-devices/issues\n\n### 8. References\n#### 1.\n\u0026nbsp;\u0026nbsp;**PCI passthrough via OVMF**. ArchWiki. Accessed June 14, 2024.\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003csup\u003ehttps://wiki.archlinux.org/title/PCI_passthrough_via_OVMF.\u003c/sup\u003e\n\n#### 2.\n\u0026nbsp;\u0026nbsp;**VFIO - ‘Virtual Function I/O’ - The Linux Kernel Documentation**.\nThe linux kernel. Accessed June 14, 2024.\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003csup\u003ehttps://www.kernel.org/doc/html/latest/driver-api/vfio.html.\u003c/sup\u003e\n\n#### 3.\n\u0026nbsp;\u0026nbsp;**VFIO Discussion and Support**. Reddit. Accessed June 14, 2024.\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003csup\u003ehttps://www.reddit.com/r/VFIO/.\u003c/sup\u003e\n\n#### 4.\n\u0026nbsp;\u0026nbsp;**XML Design Format** GitHub - libvirt/libvirt. Accessed June 18, 2024.\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003csup\u003ehttps://github.com/libvirt/libvirt/blob/master/docs/formatdomain.rst.\u003c/sup\u003e\n\n### 9. Planned Features\n- XML file support.\n  - useful for systems which have VFIO setups, but do not necessarily change\n  hardware often.\n##\n\n#### Click [here](#parse-iommu-devices) to return to the top of this document.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportellam%2Fparse-iommu-devices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fportellam%2Fparse-iommu-devices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportellam%2Fparse-iommu-devices/lists"}