← Documents Documentation/networking/device_drivers/ethernet/amd/pds_vfio_pci.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

PCI VFIO driver for the AMD/Pensando DSC adapter family

Live Migration용 Pensando VF를 생성하고 자동 probe를 막은 뒤 driver_override와 bind로 pds-vfio-pci에 연결하는 절차입니다.

Source pathDocumentation/networking/device_drivers/ethernet/amd/pds_vfio_pci.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

pds_vfio_pci.rst:1-79

`pds-vfio-pci`는 Live Migration이 가능한 DSC VF를 userspace VFIO framework에 연결합니다. 핵심은 일반 VF driver의 자동 probe를 차단한 뒤 VF를 생성하고, override와 bind를 명시적으로 수행하는 것입니다.

VFIO bind 전체 흐름
PCI 주소 지정Autoprobe 차단SR-IOV VF 생성Driver overrideVF bind`/dev/vfio/<iommu_group>`

각 sysfs write의 순서가 VF 소유권을 pds-vfio-pci로 넘깁니다.

PCI 식별자
Variable예제 값대상
`PF_BUS``0000:60`PF가 있는 PCI bus
`PF_BDF``0000:60:00.0`Physical Function
`VF_BDF``0000:60:00.1`Virtual Function

예제에서 사용하는 PF bus와 function 주소입니다.

Autoprobe 차단
`sriov_drivers_autoprobe``echo 0`Non-VFIO probe 비활성화VFIO bind 준비

VF 생성 전에 일반 VF driver가 먼저 device를 잡지 못하게 합니다.

Sysfs 작업
PathValue효과
`.../sriov_drivers_autoprobe``0`자동 VF probe 차단
`pds_core/.../sriov_numvfs``1`VF 하나 생성
`VF_BDF/driver_override``pds-vfio-pci`허용 driver 지정
`pds-vfio-pci/bind``VF_BDF`VF 명시적 bind

각 write가 바꾸는 kernel 상태를 정리했습니다.

Driver ownership 전환
`pds_core`가 VF 생성Unbound VF`driver_override=pds-vfio-pci`Bind 요청VFIO-owned VF

VF는 생성 직후 자동 bind되지 않고 override를 거쳐 VFIO driver로 이동합니다.

성공 확인
확인 대상예상 결과
VF driver`pds-vfio-pci`
VFIO device node`/dev/vfio/<iommu_group>`
용도Live Migration 가능한 VF

Bind 이후 userspace에 노출되는 결과입니다.

지원 채널
범위연락처
일반 Linux networking`[email protected]`
Pensando driver 상세 지원`[email protected]`

문의 범위에 따라 연락처를 구분합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0+
2 .. note: can be edited and viewed with /usr/bin/formiko-vim
3
4 ==========================================================
5 PCI VFIO driver for the AMD/Pensando(R) DSC adapter family
6 ==========================================================
7
8 AMD/Pensando Linux VFIO PCI Device Driver
9 Copyright(c) 2023 Advanced Micro Devices, Inc.
10
11 Overview
12 ========
13
14 The ``pds-vfio-pci`` module is a PCI driver that supports Live Migration
15 capable Virtual Function (VF) devices in the DSC hardware.
16
17 Using the device
18 ================
19
20 The pds-vfio-pci device is enabled via multiple configuration steps and
21 depends on the ``pds_core`` driver to create and enable SR-IOV Virtual
22 Function devices.
23
24 Shown below are the steps to bind the driver to a VF and also to the
25 associated auxiliary device created by the ``pds_core`` driver. This
26 example assumes the pds_core and pds-vfio-pci modules are already
27 loaded.
28
29 .. code-block:: bash
30 :name: example-setup-script
31
32 #!/bin/bash
33
34 PF_BUS="0000:60"
35 PF_BDF="0000:60:00.0"
36 VF_BDF="0000:60:00.1"
37
38 # Prevent non-vfio VF driver from probing the VF device
39 echo 0 > /sys/class/pci_bus/$PF_BUS/device/$PF_BDF/sriov_drivers_autoprobe
40
41 # Create single VF for Live Migration via pds_core
42 echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs
43
44 # Allow the VF to be bound to the pds-vfio-pci driver
45 echo "pds-vfio-pci" > /sys/class/pci_bus/$PF_BUS/device/$VF_BDF/driver_override
46
47 # Bind the VF to the pds-vfio-pci driver
48 echo "$VF_BDF" > /sys/bus/pci/drivers/pds-vfio-pci/bind
49
50 After performing the steps above, a file in /dev/vfio/<iommu_group>
51 should have been created.
52
53
54 Enabling the driver
55 ===================
56
57 The driver is enabled via the standard kernel configuration system,
58 using the make command::
59
60 make oldconfig/menuconfig/etc.
61
62 The driver is located in the menu structure at:
63
64 -> Device Drivers
65 -> VFIO Non-Privileged userspace driver framework
66 -> VFIO support for PDS PCI devices
67
68 Support
69 =======
70
71 For general Linux networking support, please use the netdev mailing
72 list, which is monitored by Pensando personnel::
73
75
76 For more specific support needs, please use the Pensando driver support
77 email::
78
80

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

pds-vfio-pci 개요

1-16

AMD/Pensando(R) DSC adapter family용 PCI VFIO driver

AMD/Pensando Linux VFIO PCI Device Driver

Copyright(c) 2023 Advanced Micro Devices, Inc.

개요

`pds-vfio-pci` module은 DSC hardware에서 Live Migration이 가능한 Virtual Function(`VF`) device를 지원하는 PCI driver입니다.

.. SPDX-License-Identifier: GPL-2.0+
.. note: can be edited and viewed with /usr/bin/formiko-vim

==========================================================
PCI VFIO driver for the AMD/Pensando(R) DSC adapter family
==========================================================

AMD/Pensando Linux VFIO PCI Device Driver
Copyright(c) 2023 Advanced Micro Devices, Inc.

Overview
========

The ``pds-vfio-pci`` module is a PCI driver that supports Live Migration
capable Virtual Function (VF) devices in the DSC hardware.

VF 생성, driver override와 bind

17-53

Device 사용

`pds-vfio-pci` device는 여러 configuration 단계를 거쳐 활성화하며, SR-IOV Virtual Function device의 생성과 활성화는 `pds_core` driver에 의존합니다.

아래 단계는 VF와 `pds_core` driver가 만든 연관 auxiliary device를 해당 driver에 bind합니다. 이 예시는 `pds_core`와 `pds-vfio-pci` module이 이미 load되어 있다고 가정합니다.

#!/bin/bash

PF_BUS="0000:60"
PF_BDF="0000:60:00.0"
VF_BDF="0000:60:00.1"

# VF device에 non-vfio VF driver가 probe하지 못하게 함
echo 0 > /sys/class/pci_bus/$PF_BUS/device/$PF_BDF/sriov_drivers_autoprobe

# pds_core를 통해 Live Migration용 VF 하나 생성
echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs

# VF가 pds-vfio-pci driver에 bind되도록 허용
echo "pds-vfio-pci" > /sys/class/pci_bus/$PF_BUS/device/$VF_BDF/driver_override

# VF를 pds-vfio-pci driver에 bind
echo "$VF_BDF" > /sys/bus/pci/drivers/pds-vfio-pci/bind
  • `PF_BUS`, `PF_BDF`, `VF_BDF`에 대상 PCI 주소를 지정합니다.
  • `sriov_drivers_autoprobe`에 `0`을 써 일반 VF driver의 자동 probe를 막습니다.
  • `pds_core`의 `sriov_numvfs`에 `1`을 써 Live Migration용 VF 하나를 생성합니다.
  • VF의 `driver_override`에 `pds-vfio-pci`를 기록하여 bind 대상 driver를 제한합니다.
  • `pds-vfio-pci/bind`에 `VF_BDF`를 써 VF를 명시적으로 bind합니다.

위 단계를 수행하면 `/dev/vfio/<iommu_group>`에 해당하는 file이 생성되어 있어야 합니다.

Using the device
================

The pds-vfio-pci device is enabled via multiple configuration steps and
depends on the ``pds_core`` driver to create and enable SR-IOV Virtual
Function devices.

Shown below are the steps to bind the driver to a VF and also to the
associated auxiliary device created by the ``pds_core`` driver. This
example assumes the pds_core and pds-vfio-pci modules are already
loaded.

.. code-block:: bash
  :name: example-setup-script

  #!/bin/bash

  PF_BUS="0000:60"
  PF_BDF="0000:60:00.0"
  VF_BDF="0000:60:00.1"

  # Prevent non-vfio VF driver from probing the VF device
  echo 0 > /sys/class/pci_bus/$PF_BUS/device/$PF_BDF/sriov_drivers_autoprobe

  # Create single VF for Live Migration via pds_core
  echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs

  # Allow the VF to be bound to the pds-vfio-pci driver
  echo "pds-vfio-pci" > /sys/class/pci_bus/$PF_BUS/device/$VF_BDF/driver_override

  # Bind the VF to the pds-vfio-pci driver
  echo "$VF_BDF" > /sys/bus/pci/drivers/pds-vfio-pci/bind

After performing the steps above, a file in /dev/vfio/<iommu_group>
should have been created.

Driver 활성화와 지원

54-79

Driver 활성화

Driver는 표준 kernel configuration system을 통해 활성화하며 다음과 같은 make command를 사용합니다.

make oldconfig/menuconfig/etc.

Driver의 menu 위치는 다음과 같습니다.

-> Device Drivers
  -> VFIO Non-Privileged userspace driver framework
    -> VFIO support for PDS PCI devices

지원

일반 Linux networking 지원은 Pensando 담당자가 확인하는 netdev mailing list를 이용하십시오.

[email protected]

더 구체적인 지원이 필요하면 Pensando driver support email을 이용하십시오.

[email protected]
Enabling the driver
===================

The driver is enabled via the standard kernel configuration system,
using the make command::

  make oldconfig/menuconfig/etc.

The driver is located in the menu structure at:

  -> Device Drivers
    -> VFIO Non-Privileged userspace driver framework
      -> VFIO support for PDS PCI devices

Support
=======

For general Linux networking support, please use the netdev mailing
list, which is monitored by Pensando personnel::

  [email protected]

For more specific support needs, please use the Pensando driver support
email::

  [email protected]