Arm CCA for dummies
This is part of the TEEs for dummies series. After TrustZone, which isolates a secure world from a normal world, Arm Confidential Compute Architecture (CCA) is Arm’s VM-level TEE.
Arm CCA is an Arm-based TEE technology that enables the creation of confidential virtual machines called Realms, whose memory is inaccessible to privileged software like the hypervisor or host OS. Arm CCA is based on an extension to the Arm A-profile ISA (v9.2) called Arm Realm Management Extension (RME), which provides the hardware primitives for implementing Arm CCA.
Arm CCA architecture
As shown below, CCA introduces Realm world, a new physical address space for Realms, separate from the existing non-secure (NS) / normal world for untrusted software, and the secure world for trusted applications (see Arm TrustZone). A realm management monitor (RMM) runs in Realm world at a higher privilege level than Realm VMs. It provides the host OS services allowing it to create, populate, execute, and destroy Realms through a Realm Management Interface (RMI).
Each RMI command is implemented as a secure monitor call (SMC), which traps to the EL3 monitor, which in turn switches execution to the RMM in Realm world to handle the command. Upon completion, the RMM issues an SMC to EL3, which then switches execution back to the hypervisor in Normal world.
The RMM also exposes a Realm Services Interface (RSI) through which Realms can request operations such as attestation reports and shared-memory management. A higher-level privilege monitor runs at EL3 in a new world called Root world. The monitor controls all CPU context switching among the worlds.
The Root world was introduced because Realm and Secure worlds are mutually distrusting. The Root world has access to the entire physical address space. Each CPU core can program the access mode of physical address ranges to be root, realm, secure, or normal world, and a special data structure called the granule protection table (GPT) tracks which physical address belongs to which of the four worlds.
See this paper to understand the access-control policy of CCA for each world.
CCA also provides Realm attestation, which enables a remote user to verify that their workload has not been tampered with and is running on a real Arm CCA platform (not simulated).
Testing Arm CCA
There is currently no widely commercialized hardware with Arm CCA support. Most research uses Arm CCA simulators. One example is OpenCCA, a software framework from security researchers at ETH Zurich, enabling early exploration of Arm CCA on non-CCA hardware.
