Support GPU Passthrough to VMs
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- linux, rust
调研方向
首先检查现有的 FeOS VM API 和模型,然后跟踪负责设备配置的 hypervisor backend。定义 GPU PCIe-address API、验证、IOMMU/vfio-pci 处理方式以及集成测试方案;完成的标准是单 GPU 和多 GPU VMs 能向 guest 暴露可用设备,并且不可用设备能够安全失败。
由索引模型根据 Issue 内容生成。
描述
Summary
This work item enables FeOS to attach one or more physical GPUs directly to a FeOS-managed Virtual Machine (VM) using PCIe passthrough.
This functionality is critical for supporting GPU-accelerated workloads such as Artificial Intelligence (AI), Machine Learning (ML), scientific computing, and high-performance graphics within VMs. The implementation will extend the VM API to allow specifying GPUs by their host PCIe address.
Scope
✅ In Scope
- Extend the FeOS VM API to allow specifying one or more GPUs via their host PCIe address for attachment to a VM.
- Implement the backend logic for PCIe passthrough of a complete physical GPU (e.g., using IOMMU /
vfio-pci). - Ensure the guest VM can recognize the attached GPU and that appropriate vendor drivers (e.g., NVIDIA, AMD) can be installed and utilized.
- Support for passing through multiple GPUs to a single VM.
❌ Out of Scope
- GPU virtualization technologies like NVIDIA vGPU or AMD MxGPU (SR-IOV). This issue focuses exclusively on full device passthrough.
- Live migration of VMs with attached GPUs.
- Dynamic hot-plugging of GPUs. GPUs must be attached when the VM is created or started.
- Host-side GPU driver installation and configuration. This issue assumes the host is correctly prepared for passthrough.
Responsible Areas
- FeOS VM Management
- FeOS API
Contributors
- @guvenc
- @MalteJ
Acceptance Criteria
-
API
- The VM API is extended to accept a list of PCIe addresses for GPUs in the VM specification.
- The API performs validation to ensure the specified PCIe devices exist and are available for passthrough.
-
VM Runtime & Guest OS
- A VM can be successfully launched with one or more GPUs passed through to it.
- The guest operating system correctly identifies the hardware of the passed-through GPU(s) (e.g., visible in
lspci). - Vendor-specific drivers (e.g., NVIDIA driver) can be installed successfully inside the guest OS.
- A GPU-accelerated application or utility (e.g.,
nvidia-smi, a CUDA/OpenCL sample) runs successfully within the VM and can access the GPU's capabilities. - The FeOS host correctly isolates the device, preventing host-level drivers from claiming it while it is assigned to a VM.
Action Items
- Design the API extension in the VM model for specifying GPU devices.
- Implement the backend logic to configure the hypervisor for GPU passthrough (e.g., managing IOMMU groups, binding to
vfio-pci). - Ensure that all functions of a GPU (e.g., graphics and audio components on the same PCIe card) are passed through together.
- Add robust validation and error handling for cases where a GPU is unavailable or passthrough fails.
- Create integration tests that:
- Launch a VM with a single GPU and verify its functionality in the guest.
- Launch a VM with multiple GPUs and verify their functionality in the guest.
- 主要语言
- Rust
- 星标
- 24
- 派生
- 9
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ironcore-dev/FeOS 的其他 Issue
-
area/operatingsystem
难度 3/5 1-2 天 新手友好度 45/100
ironcore-dev/FeOS#103 ·
-
area/operatingsystem
难度 5/5 一周以上 新手友好度 25/100
ironcore-dev/FeOS#107 ·
-
Improve Host Management可能重新可做 @friegger 于 285 天前认领,目前没有进行中的 PR。 未关闭area/operatingsystem
ironcore-dev/FeOS#108 · 已指派 1 人 ·
-
area/operatingsystem
难度 5/5 一周以上 新手友好度 25/100
ironcore-dev/FeOS#109 ·
-
area/operatingsystem
难度 5/5 一周以上 新手友好度 35/100
ironcore-dev/FeOS#94 ·
查看 ironcore-dev/FeOS 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
farion1231/cc-switch#8829 ·
维护者通常 1 天内回复
-
bug ci good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
longbridge/gpui-kit#3677 ·
维护者通常 1 天内回复
-
E-pr-welcome
难度 2/5 1-3 小时 新手友好度 77/100
seanmonstar/reqwest#3121 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 68/100
ilya-zlobintsev/LACT#1235 ·
维护者通常 1 天内回复