요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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.
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.
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::
For more specific support needs, please use the Pensando driver support
email::
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
pds-vfio-pci 개요
1-16AMD/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-53Device 사용
`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-79Driver 활성화
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]
요약·해설
pds_vfio_pci.rst:1-79`pds-vfio-pci`는 Live Migration이 가능한 DSC VF를 userspace VFIO framework에 연결합니다. 핵심은 일반 VF driver의 자동 probe를 차단한 뒤 VF를 생성하고, override와 bind를 명시적으로 수행하는 것입니다.
각 sysfs write의 순서가 VF 소유권을 pds-vfio-pci로 넘깁니다.
예제에서 사용하는 PF bus와 function 주소입니다.
VF 생성 전에 일반 VF driver가 먼저 device를 잡지 못하게 합니다.
각 write가 바꾸는 kernel 상태를 정리했습니다.
VF는 생성 직후 자동 bind되지 않고 override를 거쳐 VFIO driver로 이동합니다.
Bind 이후 userspace에 노출되는 결과입니다.
문의 범위에 따라 연락처를 구분합니다.