SECURITY & ISOLATION

ACS (Access Control Services)

Source validation, translation blocking, P2P redirect, egress control for secure isolation

1. What is ACS?

What is Access Control Services?

Access Control Services (ACS) is a set of security controls implemented in PCIe switches and Root Complexes to ensure that peer-to-peer (P2P) transactions are properly controlled, validated, and routed. ACS is essential for virtualization environments where device isolation is critical.

ACS Purpose

2. Why ACS is Needed

Peer-to-Peer Attack Scenario

    WITHOUT ACS:
    
    ┌──────────────────────────────────────────────────────┐
    │                     HOST SYSTEM                       │
    │  ┌──────────────┐    ┌──────────────┐               │
    │  │     VM A     │    │     VM B     │               │
    │  │  (Device A)  │    │  (Device B)  │               │
    │  └──────────────┘    └──────────────┘               │
    │         ▲                    ▲                       │
    │         │                    │                       │
    │     ┌───┴────────────────────┴───┐                  │
    │     │      PCIe Switch           │                  │
    │     │                            │                  │
    │     │   A ══════════════════► B  │ ← P2P attack!    │
    │     │   (bypasses IOMMU)         │                  │
    │     └────────────────────────────┘                  │
    │                                                      │
    │   Device A can directly access Device B's memory    │
    │   without going through the IOMMU for validation    │
    └──────────────────────────────────────────────────────┘

With ACS Protection

    WITH ACS (P2P Redirect to IOMMU):
    
    ┌──────────────────────────────────────────────────────┐
    │                     HOST SYSTEM                       │
    │  ┌──────────────┐    ┌──────────────┐               │
    │  │     VM A     │    │     VM B     │               │
    │  │  (Device A)  │    │  (Device B)  │               │
    │  └──────────────┘    └──────────────┘               │
    │         ▲                    ▲                       │
    │         │                    │                       │
    │     ┌───┴────────────────────┴───┐                  │
    │     │      PCIe Switch           │                  │
    │     │        (ACS)               │                  │
    │     │   A ───► Redirect ───► RC  │                  │
    │     └────────────┬───────────────┘                  │
    │                  │                                   │
    │                  ▼                                   │
    │            ┌─────────┐                              │
    │            │  IOMMU  │ ← Validates/Blocks           │
    │            └─────────┘                              │
    └──────────────────────────────────────────────────────┘

3. ACS Control Bits

Control Abbreviation Function
ACS Source Validation V Validate TLP Requester ID against port
ACS Translation Blocking B Block transactions with AT field set
ACS P2P Request Redirect R Redirect P2P requests to RC
ACS P2P Completion Redirect C Redirect P2P completions to RC
ACS Upstream Forwarding U Forward all traffic upstream to RC
ACS P2P Egress Control E Block P2P based on egress control vector
ACS Direct Translated P2P T Allow P2P for translated transactions
ACS Enhanced Capability - Indicates enhanced ACS support

4. ACS Source Validation (V)

What it Does

Validates that the Requester ID in incoming TLPs matches what is expected for that port:

Validation Mechanism

5. ACS Translation Blocking (B)

What it Does

Blocks transactions that have the Address Type (AT) field set, indicating they carry translated addresses:

AT Field Values

AT Value Meaning Blocked?
00b Untranslated No
01b Translation Request No
10b Translated Yes (if B enabled)
11b Reserved Yes

6. ACS P2P Request Redirect (R)

What it Does

Redirects peer-to-peer Memory Requests upstream toward the Root Complex instead of forwarding directly to the peer device:

Affected Traffic

7. ACS P2P Completion Redirect (C)

What it Does

Redirects peer-to-peer Completions upstream toward the Root Complex:

When Used

8. ACS Upstream Forwarding (U)

What it Does

Forces all egress traffic upstream, regardless of destination address:

Use Case

Maximum security environments where no P2P communication is acceptable.

9. ACS P2P Egress Control (E)

What it Does

Fine-grained control over which peer ports can receive P2P traffic from this port:

Egress Control Vector

10. ACS Extended Capability Structure

Offset Register
00h Extended Capability Header (ID = 000Dh)
04h ACS Capability Register
06h ACS Control Register
08h Egress Control Vector (variable size)

11. System Configuration

ACS Configuration for Virtualization

  1. Enumerate all switches in hierarchy
  2. Enable ACS Source Validation (V) on all ports
  3. Enable ACS Translation Blocking (B)
  4. Enable ACS P2P Request Redirect (R) on switch ports
  5. Enable ACS P2P Completion Redirect (C) if needed
  6. Configure Egress Control Vector for selective P2P

IOMMU Integration