ACS: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
=== PCIe Peer To Peer ===
=== PCIe Peer To Peer ===
The PCIe specification allows for peer-to-peer transactions. This means that it is possible and even desirable in some cases for one PCIe endpoint, to send data directly to another endpoint without having to go through the Root Complex.
The PCIe specification allows for peer-to-peer transactions. This means that it is possible and even desirable in some cases for one PCIe endpoint, to send data directly to another endpoint without having to go through the Root Complex.<ref>file:///Users/bpark/Downloads/pci-sig-sr-iov-primer-sr-iov-technology-paper.pdf</ref>
[[파일:PCIe P2P.png|가운데|섬네일]]
[[파일:PCIe P2P.png|가운데|섬네일]]



Revision as of 12:21, 19 March 2023

PCIe Peer To Peer

The PCIe specification allows for peer-to-peer transactions. This means that it is possible and even desirable in some cases for one PCIe endpoint, to send data directly to another endpoint without having to go through the Root Complex.[1] 가운데|섬네일

Access Control Services (ACS)

ACS provides a mechanism by which a Peer-to-Peer PCIe transaction can be forced to go up through the PCIe Root Complex. ACS can be thought of as a kind of gate-keeper —preventing unauthorized transactions from occurring.

Without ACS, it is possible for a PCIe Endpoint to either accidentally or intentionally (maliciously) write to an invalid/illegal area on a peer endpoint, potentially causing problems.

Usually ACS used for IO virtualization (also known as, VT-d or IOMMU) which can be enable or disable in BIOS or Kernel level.

PLX PCI Bridge

You can check whether ACS is enabled on PCI bridges by running:

sudo lspci -vvv | grep ACSCtl

If lines show “ACSCtl: SrcValid+”, then ACS might be enabled. Looking at the full output of lspci, one can check if a PCI bridge has ACS enabled.

sudo lspci -vvv 

If PCI switches have ACS enabled, it needs to be disabled. On some systems this can be done from the BIOS by disabling IO virtualization or VT-d. For Broadcom PLX devices, it can be done from the OS but needs to be done again after each reboot.

Use the command below to find the PCI bus IDs of PLX PCI bridges:

sudo lspci -vvv | grep ACSCtrl

Next, use setpci to disable ACS with the command below, replacing 03:00.0 by the PCI bus ID of each PCI bridge.

run "setpci -s bus#:slot#.func# f2a.w=0000" to disable ACSCtl on the PLX switch.

e.g.

#setpci -s 03:08.0 f2a.w=0000 *assume 03:08.0 is the PLX pcie switch*

run lspci -vvv to confirm ACSCtrl is disabled on PLX switch.

sudo setpci -s 03:00.0 f2a.w=0000

AMD CPU

disabling IOMMU in bios or GRU

  1. sudo nano /etc/default/grub
  2. GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=soft"
  3. sudo update-grub
  4. reboot
  1. file:///Users/bpark/Downloads/pci-sig-sr-iov-primer-sr-iov-technology-paper.pdf