Skip to content

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Nov 18, 2025

deepin inclusion
category: feature

our LoongArch has enable the config, many distro has enable it,
just enable in x86 and arm64 now.

Summary by Sourcery

New Features:

  • Enable IOMMUFD support in Deepin kernel defconfigs for x86 and arm64

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 18, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This patch introduces the CONFIG_IOMMUFD option into Deepin’s x86 and ARM64 desktop kernel defconfig files, aligning them with the LoongArch configuration and enabling IOMMU file descriptors support across architectures.

File-Level Changes

Change Details Files
Enable CONFIG_IOMMUFD in ARM64 desktop defconfig
  • Added CONFIG_IOMMUFD=y to deepin_arm64_desktop_defconfig
arch/arm64/configs/deepin_arm64_desktop_defconfig
Enable CONFIG_IOMMUFD in x86 desktop defconfig
  • Added CONFIG_IOMMUFD=y to deepin_x86_desktop_defconfig
arch/x86/configs/deepin_x86_desktop_defconfig

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

deepin inclusion
category: feature

our LoongArch has enable the config, many distro has enable it,
just enable in x86 and arm64 now.

Signed-off-by: Wentao Guan <[email protected]>
@opsiff opsiff force-pushed the linux-6.6.y-2025-11-18-config branch from dadb84f to 025af43 Compare November 18, 2025 02:28
@deepin-ci-robot
Copy link

deepin pr auto review

我来分析一下这个内核配置变更的 diff:

  1. 主要变更内容:
  • 在 ARM64 和 x86 架构的配置中都添加了 CONFIG_IOMMUFD=m
  • 将 x86 架构的 CONFIG_VFIO 从内置(y)改为模块(m)
  1. 分析与建议:

代码质量:

  • 配置项的修改遵循了内核配置的标准格式,没有语法问题
  • 使用模块(m)而不是内置(y)是一个好的实践,这提供了更好的灵活性

性能影响:

  • 将 VFIO 改为模块可以减少内核镜像大小,但可能会增加少量模块加载时的开销
  • IOMMUFD 作为模块加载是合适的,因为它不是系统启动必需的组件

安全性:

  • IOMMUFD 的启用需要特别注意,因为它涉及设备内存管理
  • VFIO_NOIOMMU=y 的配置可能带来安全风险,建议评估是否真的需要禁用 IOMMU 保护

改进建议:

  1. 对于 IOMMUFD 的启用:
# 建议添加相关的安全配置
CONFIG_IOMMUFD=m
CONFIG_IOMMUFD_TEST=n  # 除非需要测试,否则禁用
  1. 对于 VFIO 配置:
# 考虑是否真的需要 NOIOMMU
# 如果不是必需的,建议禁用
# CONFIG_VFIO_NOIOMMU=y
  1. 文档建议:
  • 建议在变更说明中详细说明启用 IOMMUFD 的原因和使用场景
  • 说明 VFIO 改为模块的具体考虑
  1. 依赖检查:
  • 确保所有依赖的配置项都已正确启用
  • 验证新的配置组合不会与其他配置产生冲突
  1. 测试建议:
  • 需要测试 IOMMUFD 模块的加载和功能
  • 验证 VFIO 作为模块加载后的设备分配功能
  • 测试系统在启用这些配置后的稳定性和性能

这个变更看起来是合理的,但建议进行充分的测试,特别是在涉及 IOMMU 和设备分配的场景下。

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables IOMMUFD (IOMMU Userspace API) support in Deepin kernel configurations for x86 and ARM64 architectures. IOMMUFD is a modern user API to control the IOMMU subsystem for managing I/O page tables, designed to eventually replace the legacy VFIO container model. The PR aligns with the existing LoongArch configuration which already has IOMMUFD enabled.

  • Adds CONFIG_IOMMUFD=m to both x86 and ARM64 Deepin defconfigs
  • Changes CONFIG_VFIO from built-in (y) to module (m) in x86 to maintain consistency

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
arch/x86/configs/deepin_x86_desktop_defconfig Enables IOMMUFD module and changes VFIO to module for consistency
arch/arm64/configs/deepin_arm64_desktop_defconfig Enables IOMMUFD module (VFIO was already a module)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lanlanxiyiji lanlanxiyiji merged commit 676f50a into deepin-community:linux-6.6.y Nov 27, 2025
18 checks passed
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lanlanxiyiji
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants