Process enclaves run faster inside confidential virtual machines
Enabling Extended SGX Enclaves inside Confidential Virtual Machines
Cryptography and SecurityOperating Systems
Summary
Protecting programs from hacking in the cloud is tricky because different security tools have unique strengths and weaknesses. The authors show a way to run Intel SGX enclaves, which protect parts of a program, inside AMD’s confidential virtual machines, which shield whole virtual computers. This combination fixes SGX’s performance and programming limitations and still keeps programs secure. They built a system called TEEVisor that runs fast and efficiently on real AMD hardware, making it practical for real-world use.
What this means in practice
- •For cloud infrastructure engineers: Deploy secure process-level enclaves within confidential VMs to protect cloud workloads with improved performance and flexibility.
- •For enterprise security teams: Enhance data and code protection for sensitive applications by combining SGX enclaves with AMD SEV-SNP confidential virtual machines.
Authors
Pamenas Kariuki, Dong Yiliang, Quoc Do Le, Christof Fetzer
Abstract
Confidential Virtual Machines (CVMs), such as AMD SEV-SNP, and process enclaves, such as Intel SGX, provide workload protection against cloud threats. However, they strongly differ in TCB, deployment cost and speed, peer workload protection, resource sharing, fine-grained isolation and attestation, and programming capabilities. Nesting process enclaves within CVMs offers an optimal solution and an opportunity to address long-standing SGX limitations: lack of intra-enclave protection, expensive transitions and exception paths, slow enclave cloning, and a restricted programming model that limits Library Operating Systems (LibOS). This paper introduces TEEVisor, a CVM-resident architecture consisting of a security monitor and a kernel driver that leverages AMD SEV-SNP Virtual Machine Privilege Levels (VMPLs) to build hardware-protected, process-level enclaves inside a guest CVM with two modes: (1) an SGX binary compatibility mode to run unmodified SGX applications; and (2) a novel extended SGX~(eSGX) mode optimizing slow execution paths and offering richer enclave programming capabilities. On commercial AMD EPYC hardware, against native CVM execution, TEEVisor incurs under 5% overhead on compute- and memory-bound workloads, around 12% on I/O-heavy applications, and accelerates enclave cloning to a rate of 93~$μ$s/MB of enclave size, demonstrating that eSGX semantics inside a CVM are practical for production use.