Skip to content

utils/vfio: Add APIs for VFIO container and device management - #109

Open
dhsrivas wants to merge 1 commit into
avocado-framework:mainfrom
dhsrivas:utilities_vfio
Open

utils/vfio: Add APIs for VFIO container and device management#109
dhsrivas wants to merge 1 commit into
avocado-framework:mainfrom
dhsrivas:utilities_vfio

Conversation

@dhsrivas

Copy link
Copy Markdown

This patch introduces a set of VFIO (Virtual Function I/O) helper APIs to simplify container, IOMMU group, and device management. The new functions provide a clean abstraction over common VFIO operations:

  • get_vfio_container_fd() – open and validate a VFIO container
  • check_vfio_container() – verify API version and IOMMU extension support
  • get_iommu_group_fd() – obtain an IOMMU group file descriptor
  • attach_group_to_container()/detach_group_from_container() – manage group association with a VFIO container
  • get_device_fd() – retrieve a VFIO device file descriptor
  • vfio_device_supports_irq() – check if a device supports the requested number of MSI-X interrupts

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: af0c8fb0-0667-4e6c-8887-e89ac536175c


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pevogam

pevogam commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Hi @dhsrivas , I think I can propose a fix for your failing CI variants in avocado-framework/avocado#6343. Once it gets merged I will ask you to rebase to the main branch and push again if possible so we can restore the coverage for your PR.

@pevogam

pevogam commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Ok, merged. Could you please rebase on the master branch and push again?

This patch introduces a set of VFIO (Virtual Function I/O) helper APIs
to simplify container, IOMMU group, and device management. The new
functions provide a clean abstraction over common VFIO operations:

* get_vfio_container_fd() – open and validate a VFIO container
* check_vfio_container() – verify API version and IOMMU extension support
* get_iommu_group_fd() – obtain an IOMMU group file descriptor
* attach_group_to_container()/detach_group_from_container() – manage group
  association with a VFIO container
* get_device_fd() – retrieve a VFIO device file descriptor
* vfio_device_supports_irq() – check if a device supports the requested
  number of MSI-X interrupts

Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
@dhsrivas

Copy link
Copy Markdown
Author

@pevogam If I understand correctly, you’d like me to re-push the PR. I’ve done that — please take a look when you have a moment. Thanks.

@pevogam
pevogam self-requested a review August 27, 2026 11:10
@pevogam

pevogam commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Hi @dhsrivas, this PR needs accompanying documentation and unit tests as done in some previous commits migrating code like 210b17e or 3bdf5ff. Would you mind adding some of that?

@harvey0100 @PraveenPenguin The code rabbit claims this repo has under 10 stars so it denies us its autoreview functionality, could you star it and add more colleagues to star it so that we can recover the autoreview here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review Requested

Development

Successfully merging this pull request may close these issues.

2 participants