SlideShare a Scribd company logo
AMD Memory
Encryption
Xen Developer Summit 2016
Brijesh Singh
2 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
AGENDA
 Technology
 Key Management
 Integration
Technology
4 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
MOTIVATION -- CLOUD
 Hypervisor must enforce full isolation between co-resident VMs
‒ Typically using hardware virtualization support like AMD-V™ Technology
‒ “Logical isolation” using page tables, VM intercepts, etc.
‒ Sometimes breaks down
‒ QEMU “VENOM” (CVE-2015-3456)
‒ VirtualBox bug (CVE-2014-0983)
‒ Etc.
 Cloud users must fully trust the cloud hosting company
‒ Hypervisor has full access to guest secrets in memory
‒ Hypervisor enforces all isolation
‒ Not ideal for users or cloud companies
5 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
HARDWARE MEMORY ENCRYPTION - ATTACKS
User Access
Attacks
• Administrator scrapes memory of guest data
areas
• Administrator injects code into a guest VM
• Hypervisor bug allows hosted guest to steal
data from other guests
Physical Access
Attacks
• Probe the physical DRAM interface
• Install HW device that accesses guest memory
• Freeze then steal DIMMs
• Steal NVDIMMs
DEFENDED BY AMD SECURE MEMORY ENCRYPTION + AMD SECURE ENCRYPTED VIRTUALIZATION
6 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
HARDWARE MEMORY ENCRYPTION - HW SUPPORT
 Hardware AES engine located in the memory controller
performs inline encryption/decryption of DRAM
 Minimal performance impact
‒ Extra latency only taken for encrypted pages
 No application changes required
 Encryption keys are managed by the AMD Secure Processor
and are hardware isolated
‒ not known to any software on the CPU
DRAM
AES-128 Engine
AMD Secure Memory Encryption / AMD Secure Encrypted Virtualization
AMD
Secure
Processor1
Root of Trust
Defense against unauthorized access to memory
7 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
HW MEMORY ENCRYPTION – AMD SECURE MEMORY ENCRYPTION
 Helps protects against physical memory
attacks
 Single key is used for encryption of system
memory
 Hypervisor chooses pages to encrypt via
page tables
 Support for hardware devices (network,
storage, graphics cards) to access encrypted
pages seamlessly through DMA
Added Defense against unauthorized access to
memory
DRAM
AES-128 Engine
Xen Hypervisor
Dom0
Key
DomU DomU
8 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
DRAM
AES-128 Engine
Xen Hypervisor
PV
Key
PVH PVH
Key Key
PVH
HW MEMORY ENCRYPTION – AMD SECURE ENCRYPTED VIRTUALIZATION
 Additional isolation of VMs from each other and
administrator tampering
 One key for Hypervisor and one key per VM, groups of
VMs, or VM/Sandbox with multiple containers
 Cryptographically isolates the hypervisor from the
guest VMs
 Integrates with existing AMD-V™ technology
 System can also run unsecure VMs
Enhances isolation of VMs
Hypervisor
Guest
…
Traditional
Virtualization
AMD Secure Encrypted Virtualization
Hypervisor Guest Guest
9 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
SEV ARCHITECTURE
10 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
AMD SECURE ENCRYPTED VIRTUALIZATION DETAILS
 Address Space ID (ASID) determines VM encryption key
‒ Maximum supported key can be obtained through Fn8000_001F[CX]
‒ ASID is tagged with all data within the SoC
‒ ASID determines encryption key to use when data enters/leaves SoC
 HW and Guest page tables determine if a page is “private” or “shared”
‒ Instruction code pages always “private”
‒ Guest page tables always “private”
‒ Data pages can be “private” (C=1) or “shared” (C=0) depending on page tables
‒ Before CR4.PAE=1, all pages are “private”
 All DMA must occur to “shared” pages
 Example use: all guest pages are “private” except for DMA pages
Key Management
12 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
AMD SECURE ENCRYPTED VIRTUALIZATION KEY MANAGEMENT
 Firmware executes on the AMD Secure
Processor
‒ Isolated from x86 software
 Communicates with x86 software
‒ Mailbox registers
‒ Shared memory buffers
 Assists hypervisor in VM lifecycle
‒ Generates and manages encryption keys
‒ Bootstraps memory encryption during guest
launch
‒ Prepares guest memory image for transmission
before migration (or snapshot)
‒ Receives guest memory image after migration
(or snapshot)
 Enforces guest policy
ARCHITECTURE
Hypervisor SEV Firmware
MMIO Registers
X86 Processor AMD Security
Processor
DRAM
Command Buffer
Memory
Controller
Keys
13 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
AMD SECURE ENCRYPTED VIRTUALIZATION MANAGEMENT API
 Launch API’s
- LAUNCH_START, LAUNCH_UPDATE, LAUNCH_FINISH
- ACTIVATE, DEACTIVATE, DECOMISSION
 Migration and Snapshot API’s
- SEND_START, SEND_UPDATE and SEND_FINISH
 Debugging API’s
- GUEST_STATUS, DBG_DECRYPT, DBG_ENCRYPT
 Platform Key/Certificates management API’s
- PSP_INIT, PSP_SHUTDOWN, PLATFORM_STATUS, FACTORY_RESET
- PDH_EXPORT, PDH_GEN
- PEK_GEN, PEK_IMPORT
Reference: Secure Encrypted Virtualization Key Management
Integration
15 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
INTEGRATION
 Key Management API
‒ Add support for calling launch guests, migrate guests, etc into Xen kernel.
‒ Unwrap and encrypt guests for execution
‒ Wrap/unwrap guest memory pages for migration
‒ Invoke AMD Secure Processor driver to perform communication with the AMD Secure Processor (Dom0)
‒ Update virtualization tools (libxl, libvirt, etc.)
‒ Initialize platform
‒ Store and provide guest key material
‒ Return guest measurements
16 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
INTEGRATION
 Key Management API
 ASID Management
‒ AMD Secure Encrypted Virtualization guests must have the same ASID for all vCPUs
‒ Requires TLB flush if a different vCPU for the same ASID is to be run on the same host CPU
‒ AMD Secure Encrypted Virtualization guests must have an ASID value within specified range
‒ AMD Secure Encrypted Virtualization ASID range obtained through CPUID instruction
‒ Non-AMD Secure Encrypted Virtualization guests can use any ASID
‒ Should use a value outside the AMD Secure Encrypted Virtualization ASID range to avoid reducing available AMD Secure
Encrypted Virtualization resources
17 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
INTEGRATION
 Key Management API
 ASID Management
 Debug Support
‒ Controlled through guest policy
‒ Allows for QEMU to encrypt/decrypt guest memory
‒ Maintains compatibility with current debug techniques
18 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
INTEGRATION
 Key Management API
 ASID Management
 Debug Support
 Next Step
‒ Start discussion on Xen-devel mailing list
‒ Send Xen SME RFC
19 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
SOFTWARE SUMMARY
 AMD is developing
‒ AMD Secure Processor firmware to implement key management tasks (distributed in AGESA)
‒ Signed by AMD, source not public
‒ Xen Hypervisor modification and Guest kernel modification
‒ Open source
 Other major components
‒ Linux kernel support for AMD Secure Memory Encryption and AMD Secure Encrypted Virtualization
‒ RFC patches have been sent to LKML
20 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
REFERENCES
 Whitepapers (http://developer.amd.com/resources/documentation-articles/articles-whitepapers/)
‒ AMD Memory Encryption – Overview of AMD Secure Memory Encryption and AMD Secure Encrypted Virtualization
features
 Manuals/Specifications (http://developer.amd.com/resources/documentation-articles/developer-guides-
manuals/)
‒ AMD64 Architecture Programmer’s Manual Volume 2: System Programming (sections 7.10 and 15.34)
‒ Secure Encrypted Virtualization Key Management
21 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
Thank You!
22 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 |
DISCLAIMER & ATTRIBUTION
The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors.
The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard version changes, new model and/or product
releases, product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. AMD assumes no obligation to update or otherwise correct or revise this information. However, AMD reserves the
right to revise this information and to make changes from time to time to the content hereof without obligation of AMD to notify any person of such revisions or changes.
AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF AND ASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION.
AMD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AMD BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL
DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
ATTRIBUTION
© 2016 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United States and/or other jurisdictions. Other names are for informational
purposes only and may be trademarks of their respective owners.
 1. AMD Secure Processor (formerly “Platform Security Processor” or “PSP”) is a dedicated processor that features ARM TrustZone® technology, along
with a software-based Trusted Execution Environment (TEE) designed to enable third-party trusted applications. AMD Secure Processor is a hardware-
based technology which enables secure boot up from BIOS level into the TEE. Trusted third-party applications are able to leverage industry-standard
APIs to take advantage of the TEE’s secure execution environment. Not all applications utilize the TEE’s security features. AMD Secure Processor is
currently only available on select AMD A-Series and AMD E-Series APUs. GD-72

More Related Content

What's hot (20)

PDF
Anti-tampering in Android and Take Look at Google SafetyNet Attestation API
Arash Ramez
 
PDF
NF103: Choosing The Right Nutanix Platform
NEXTtour
 
PDF
Introduction to OpenStack
Edureka!
 
PDF
Accelerating Virtual Machine Access with the Storage Performance Development ...
Michelle Holley
 
PPT
GPU Virtualization in Embedded Automotive Solutions
GlobalLogic Ukraine
 
PDF
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
The Linux Foundation
 
PPTX
Pervasive Computing
Anshuman Biswal
 
PPT
Configuration management with puppet
Jakub Stransky
 
PDF
IBM Rational Rhapsody and Qt Integration
gjuljo
 
PPTX
Fpga based motor controller
Uday Wankar
 
PDF
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...
Edureka!
 
PPTX
Autosar fundamental
Omkar Rane
 
PDF
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
Linaro
 
PPTX
Introduction to linux containers
Google
 
PDF
TEE - kernel support is now upstream. What this means for open source security
Linaro
 
PPTX
Routebased-Policybased VPN.pptx
Dhruv Sharma
 
PDF
SFO15-503: Secure storage in OP-TEE
Linaro
 
PPTX
AUTOSAR Memory Stcak (MemStack).
Embitel Technologies - A VOLKSWAGEN GROUP COMPANY
 
PDF
Universal Messaging: Transforming How Businesses Communicate
Software AG
 
Anti-tampering in Android and Take Look at Google SafetyNet Attestation API
Arash Ramez
 
NF103: Choosing The Right Nutanix Platform
NEXTtour
 
Introduction to OpenStack
Edureka!
 
Accelerating Virtual Machine Access with the Storage Performance Development ...
Michelle Holley
 
GPU Virtualization in Embedded Automotive Solutions
GlobalLogic Ukraine
 
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
The Linux Foundation
 
Pervasive Computing
Anshuman Biswal
 
Configuration management with puppet
Jakub Stransky
 
IBM Rational Rhapsody and Qt Integration
gjuljo
 
Fpga based motor controller
Uday Wankar
 
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...
Edureka!
 
Autosar fundamental
Omkar Rane
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
Linaro
 
Introduction to linux containers
Google
 
TEE - kernel support is now upstream. What this means for open source security
Linaro
 
Routebased-Policybased VPN.pptx
Dhruv Sharma
 
SFO15-503: Secure storage in OP-TEE
Linaro
 
AUTOSAR Memory Stcak (MemStack).
Embitel Technologies - A VOLKSWAGEN GROUP COMPANY
 
Universal Messaging: Transforming How Businesses Communicate
Software AG
 

Viewers also liked (20)

PDF
XPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, Huawei
The Linux Foundation
 
PDF
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
The Linux Foundation
 
PDF
XPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
The Linux Foundation
 
PDF
XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...
The Linux Foundation
 
PDF
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
The Linux Foundation
 
PDF
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
The Linux Foundation
 
PDF
Fosdem17 - Mixed License FOSS Projects
The Linux Foundation
 
PDF
Fosdem 17 - Towards a HVM-like Dom0 for Xen
The Linux Foundation
 
PDF
XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
The Linux Foundation
 
PPTX
XPDS16: Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...
The Linux Foundation
 
PDF
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
The Linux Foundation
 
PDF
XPDS16: Keeping coherency on ARM - Julien Grall, ARM
The Linux Foundation
 
PDF
XPDS16: High-Performance Virtualization for HPC Cloud on Xen - Jun Nakajima &...
The Linux Foundation
 
PDF
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
The Linux Foundation
 
PDF
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
The Linux Foundation
 
PDF
BSDCan 2015: How to Port BSD as a Xen on ARM Guest
The Linux Foundation
 
PDF
Xen summit amd_2010v3
The Linux Foundation
 
PDF
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
The Linux Foundation
 
ODP
Cobbler Summit - Automated Xen VM Deployment
Abhishek Singh
 
PDF
Xen @ Google, 2011
The Linux Foundation
 
XPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, Huawei
The Linux Foundation
 
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
The Linux Foundation
 
XPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
The Linux Foundation
 
XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...
The Linux Foundation
 
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
The Linux Foundation
 
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
The Linux Foundation
 
Fosdem17 - Mixed License FOSS Projects
The Linux Foundation
 
Fosdem 17 - Towards a HVM-like Dom0 for Xen
The Linux Foundation
 
XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
The Linux Foundation
 
XPDS16: Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...
The Linux Foundation
 
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
The Linux Foundation
 
XPDS16: Keeping coherency on ARM - Julien Grall, ARM
The Linux Foundation
 
XPDS16: High-Performance Virtualization for HPC Cloud on Xen - Jun Nakajima &...
The Linux Foundation
 
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
The Linux Foundation
 
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
The Linux Foundation
 
BSDCan 2015: How to Port BSD as a Xen on ARM Guest
The Linux Foundation
 
Xen summit amd_2010v3
The Linux Foundation
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
The Linux Foundation
 
Cobbler Summit - Automated Xen VM Deployment
Abhishek Singh
 
Xen @ Google, 2011
The Linux Foundation
 
Ad

Similar to XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, Advanced Micro Devices (AMD) (20)

PDF
KVM-22-Supporting TEE on x86 client platforms with pKVM_2.pdf
d0re3nschw4rtz1277
 
PDF
Gal Diskin - Virtually Impossible
DefconRussia
 
PPS
Xen Euro Par07
congvc
 
PPTX
Zero footprint guest memory introspection from xen
Bitdefender Enterprise
 
PPTX
Virtualization of computing and servers
pooranionline
 
PPTX
µ-Xen
Lars Kurth
 
PPTX
2011 10-19
Yaoyao Wang
 
PDF
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
The Linux Foundation
 
PPT
Virtualization
satchipatra
 
PDF
D1 t2 jonathan brossard - breaking virtualization by switching to virtual 8...
kbour23
 
PDF
XS Japan 2008 BitVisor English
The Linux Foundation
 
PDF
Graphics virtualization
The Linux Foundation
 
PDF
Graphics virtualization
The Linux Foundation
 
PDF
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
Vietnam Open Infrastructure User Group
 
PPT
Virtual Pc Seminar
guest5b5549
 
PDF
Sierraware ARM hypervisor
Sierraware
 
PDF
Rootlinux17: An introduction to Xen Project Virtualisation
The Linux Foundation
 
PDF
Back to the Future with Platform Security - HardwearIO USA 2023
ssuser46c890
 
PDF
blah blah blah blah blah blah blah blah blah blah blah blah
ZiyanMaraikar1
 
KVM-22-Supporting TEE on x86 client platforms with pKVM_2.pdf
d0re3nschw4rtz1277
 
Gal Diskin - Virtually Impossible
DefconRussia
 
Xen Euro Par07
congvc
 
Zero footprint guest memory introspection from xen
Bitdefender Enterprise
 
Virtualization of computing and servers
pooranionline
 
µ-Xen
Lars Kurth
 
2011 10-19
Yaoyao Wang
 
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
The Linux Foundation
 
Virtualization
satchipatra
 
D1 t2 jonathan brossard - breaking virtualization by switching to virtual 8...
kbour23
 
XS Japan 2008 BitVisor English
The Linux Foundation
 
Graphics virtualization
The Linux Foundation
 
Graphics virtualization
The Linux Foundation
 
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
Vietnam Open Infrastructure User Group
 
Virtual Pc Seminar
guest5b5549
 
Sierraware ARM hypervisor
Sierraware
 
Rootlinux17: An introduction to Xen Project Virtualisation
The Linux Foundation
 
Back to the Future with Platform Security - HardwearIO USA 2023
ssuser46c890
 
blah blah blah blah blah blah blah blah blah blah blah blah
ZiyanMaraikar1
 
Ad

More from The Linux Foundation (20)

PDF
ELC2019: Static Partitioning Made Simple
The Linux Foundation
 
PDF
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
The Linux Foundation
 
PDF
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
The Linux Foundation
 
PDF
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
The Linux Foundation
 
PDF
XPDDS19 Keynote: Unikraft Weather Report
The Linux Foundation
 
PDF
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
The Linux Foundation
 
PDF
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
The Linux Foundation
 
PDF
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
The Linux Foundation
 
PDF
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
The Linux Foundation
 
PPTX
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
The Linux Foundation
 
PPTX
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
The Linux Foundation
 
PDF
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
The Linux Foundation
 
PDF
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
The Linux Foundation
 
PDF
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
The Linux Foundation
 
PDF
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
The Linux Foundation
 
PDF
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
The Linux Foundation
 
PDF
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
The Linux Foundation
 
PDF
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
The Linux Foundation
 
PDF
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
The Linux Foundation
 
PDF
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
The Linux Foundation
 
ELC2019: Static Partitioning Made Simple
The Linux Foundation
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
The Linux Foundation
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
The Linux Foundation
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
The Linux Foundation
 
XPDDS19 Keynote: Unikraft Weather Report
The Linux Foundation
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
The Linux Foundation
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
The Linux Foundation
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
The Linux Foundation
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
The Linux Foundation
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
The Linux Foundation
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
The Linux Foundation
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
The Linux Foundation
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
The Linux Foundation
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
The Linux Foundation
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
The Linux Foundation
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
The Linux Foundation
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
The Linux Foundation
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
The Linux Foundation
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
The Linux Foundation
 
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
The Linux Foundation
 

Recently uploaded (20)

PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PPTX
Q2 Leading a Tableau User Group - Onboarding
lward7
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Q2 Leading a Tableau User Group - Onboarding
lward7
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
July Patch Tuesday
Ivanti
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 

XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, Advanced Micro Devices (AMD)

  • 1. AMD Memory Encryption Xen Developer Summit 2016 Brijesh Singh
  • 2. 2 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | AGENDA  Technology  Key Management  Integration
  • 4. 4 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | MOTIVATION -- CLOUD  Hypervisor must enforce full isolation between co-resident VMs ‒ Typically using hardware virtualization support like AMD-V™ Technology ‒ “Logical isolation” using page tables, VM intercepts, etc. ‒ Sometimes breaks down ‒ QEMU “VENOM” (CVE-2015-3456) ‒ VirtualBox bug (CVE-2014-0983) ‒ Etc.  Cloud users must fully trust the cloud hosting company ‒ Hypervisor has full access to guest secrets in memory ‒ Hypervisor enforces all isolation ‒ Not ideal for users or cloud companies
  • 5. 5 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | HARDWARE MEMORY ENCRYPTION - ATTACKS User Access Attacks • Administrator scrapes memory of guest data areas • Administrator injects code into a guest VM • Hypervisor bug allows hosted guest to steal data from other guests Physical Access Attacks • Probe the physical DRAM interface • Install HW device that accesses guest memory • Freeze then steal DIMMs • Steal NVDIMMs DEFENDED BY AMD SECURE MEMORY ENCRYPTION + AMD SECURE ENCRYPTED VIRTUALIZATION
  • 6. 6 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | HARDWARE MEMORY ENCRYPTION - HW SUPPORT  Hardware AES engine located in the memory controller performs inline encryption/decryption of DRAM  Minimal performance impact ‒ Extra latency only taken for encrypted pages  No application changes required  Encryption keys are managed by the AMD Secure Processor and are hardware isolated ‒ not known to any software on the CPU DRAM AES-128 Engine AMD Secure Memory Encryption / AMD Secure Encrypted Virtualization AMD Secure Processor1 Root of Trust Defense against unauthorized access to memory
  • 7. 7 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | HW MEMORY ENCRYPTION – AMD SECURE MEMORY ENCRYPTION  Helps protects against physical memory attacks  Single key is used for encryption of system memory  Hypervisor chooses pages to encrypt via page tables  Support for hardware devices (network, storage, graphics cards) to access encrypted pages seamlessly through DMA Added Defense against unauthorized access to memory DRAM AES-128 Engine Xen Hypervisor Dom0 Key DomU DomU
  • 8. 8 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | DRAM AES-128 Engine Xen Hypervisor PV Key PVH PVH Key Key PVH HW MEMORY ENCRYPTION – AMD SECURE ENCRYPTED VIRTUALIZATION  Additional isolation of VMs from each other and administrator tampering  One key for Hypervisor and one key per VM, groups of VMs, or VM/Sandbox with multiple containers  Cryptographically isolates the hypervisor from the guest VMs  Integrates with existing AMD-V™ technology  System can also run unsecure VMs Enhances isolation of VMs Hypervisor Guest … Traditional Virtualization AMD Secure Encrypted Virtualization Hypervisor Guest Guest
  • 9. 9 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | SEV ARCHITECTURE
  • 10. 10 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | AMD SECURE ENCRYPTED VIRTUALIZATION DETAILS  Address Space ID (ASID) determines VM encryption key ‒ Maximum supported key can be obtained through Fn8000_001F[CX] ‒ ASID is tagged with all data within the SoC ‒ ASID determines encryption key to use when data enters/leaves SoC  HW and Guest page tables determine if a page is “private” or “shared” ‒ Instruction code pages always “private” ‒ Guest page tables always “private” ‒ Data pages can be “private” (C=1) or “shared” (C=0) depending on page tables ‒ Before CR4.PAE=1, all pages are “private”  All DMA must occur to “shared” pages  Example use: all guest pages are “private” except for DMA pages
  • 12. 12 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | AMD SECURE ENCRYPTED VIRTUALIZATION KEY MANAGEMENT  Firmware executes on the AMD Secure Processor ‒ Isolated from x86 software  Communicates with x86 software ‒ Mailbox registers ‒ Shared memory buffers  Assists hypervisor in VM lifecycle ‒ Generates and manages encryption keys ‒ Bootstraps memory encryption during guest launch ‒ Prepares guest memory image for transmission before migration (or snapshot) ‒ Receives guest memory image after migration (or snapshot)  Enforces guest policy ARCHITECTURE Hypervisor SEV Firmware MMIO Registers X86 Processor AMD Security Processor DRAM Command Buffer Memory Controller Keys
  • 13. 13 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | AMD SECURE ENCRYPTED VIRTUALIZATION MANAGEMENT API  Launch API’s - LAUNCH_START, LAUNCH_UPDATE, LAUNCH_FINISH - ACTIVATE, DEACTIVATE, DECOMISSION  Migration and Snapshot API’s - SEND_START, SEND_UPDATE and SEND_FINISH  Debugging API’s - GUEST_STATUS, DBG_DECRYPT, DBG_ENCRYPT  Platform Key/Certificates management API’s - PSP_INIT, PSP_SHUTDOWN, PLATFORM_STATUS, FACTORY_RESET - PDH_EXPORT, PDH_GEN - PEK_GEN, PEK_IMPORT Reference: Secure Encrypted Virtualization Key Management
  • 15. 15 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | INTEGRATION  Key Management API ‒ Add support for calling launch guests, migrate guests, etc into Xen kernel. ‒ Unwrap and encrypt guests for execution ‒ Wrap/unwrap guest memory pages for migration ‒ Invoke AMD Secure Processor driver to perform communication with the AMD Secure Processor (Dom0) ‒ Update virtualization tools (libxl, libvirt, etc.) ‒ Initialize platform ‒ Store and provide guest key material ‒ Return guest measurements
  • 16. 16 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | INTEGRATION  Key Management API  ASID Management ‒ AMD Secure Encrypted Virtualization guests must have the same ASID for all vCPUs ‒ Requires TLB flush if a different vCPU for the same ASID is to be run on the same host CPU ‒ AMD Secure Encrypted Virtualization guests must have an ASID value within specified range ‒ AMD Secure Encrypted Virtualization ASID range obtained through CPUID instruction ‒ Non-AMD Secure Encrypted Virtualization guests can use any ASID ‒ Should use a value outside the AMD Secure Encrypted Virtualization ASID range to avoid reducing available AMD Secure Encrypted Virtualization resources
  • 17. 17 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | INTEGRATION  Key Management API  ASID Management  Debug Support ‒ Controlled through guest policy ‒ Allows for QEMU to encrypt/decrypt guest memory ‒ Maintains compatibility with current debug techniques
  • 18. 18 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | INTEGRATION  Key Management API  ASID Management  Debug Support  Next Step ‒ Start discussion on Xen-devel mailing list ‒ Send Xen SME RFC
  • 19. 19 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | SOFTWARE SUMMARY  AMD is developing ‒ AMD Secure Processor firmware to implement key management tasks (distributed in AGESA) ‒ Signed by AMD, source not public ‒ Xen Hypervisor modification and Guest kernel modification ‒ Open source  Other major components ‒ Linux kernel support for AMD Secure Memory Encryption and AMD Secure Encrypted Virtualization ‒ RFC patches have been sent to LKML
  • 20. 20 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | REFERENCES  Whitepapers (http://developer.amd.com/resources/documentation-articles/articles-whitepapers/) ‒ AMD Memory Encryption – Overview of AMD Secure Memory Encryption and AMD Secure Encrypted Virtualization features  Manuals/Specifications (http://developer.amd.com/resources/documentation-articles/developer-guides- manuals/) ‒ AMD64 Architecture Programmer’s Manual Volume 2: System Programming (sections 7.10 and 15.34) ‒ Secure Encrypted Virtualization Key Management
  • 21. 21 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | Thank You!
  • 22. 22 | AMD MEMORY ENCRYPTION | XEN SUMMIT 2016 | DISCLAIMER & ATTRIBUTION The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard version changes, new model and/or product releases, product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. AMD assumes no obligation to update or otherwise correct or revise this information. However, AMD reserves the right to revise this information and to make changes from time to time to the content hereof without obligation of AMD to notify any person of such revisions or changes. AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF AND ASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION. AMD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AMD BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ATTRIBUTION © 2016 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United States and/or other jurisdictions. Other names are for informational purposes only and may be trademarks of their respective owners.  1. AMD Secure Processor (formerly “Platform Security Processor” or “PSP”) is a dedicated processor that features ARM TrustZone® technology, along with a software-based Trusted Execution Environment (TEE) designed to enable third-party trusted applications. AMD Secure Processor is a hardware- based technology which enables secure boot up from BIOS level into the TEE. Trusted third-party applications are able to leverage industry-standard APIs to take advantage of the TEE’s secure execution environment. Not all applications utilize the TEE’s security features. AMD Secure Processor is currently only available on select AMD A-Series and AMD E-Series APUs. GD-72