1 =============================
2 Virtual TPM interface for Xen
3 =============================
5 Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
7 This document describes the virtual Trusted Platform Module (vTPM) subsystem for
8 Xen. The reader is assumed to have familiarity with building and installing Xen,
9 Linux, and a basic understanding of the TPM and vTPM concepts.
14 The goal of this work is to provide a TPM functionality to a virtual guest
15 operating system (in Xen terms, a DomU). This allows programs to interact with
16 a TPM in a virtual system the same way they interact with a TPM on the physical
17 system. Each guest gets its own unique, emulated, software TPM. However, each
18 of the vTPM's secrets (Keys, NVRAM, etc) are managed by a vTPM Manager domain,
19 which seals the secrets to the Physical TPM. If the process of creating each of
20 these domains (manager, vTPM, and guest) is trusted, the vTPM subsystem extends
21 the chain of trust rooted in the hardware TPM to virtual machines in Xen. Each
22 major component of vTPM is implemented as a separate domain, providing secure
23 separation guaranteed by the hypervisor. The vTPM domains are implemented in
24 mini-os to reduce memory and processor overhead.
26 This mini-os vTPM subsystem was built on top of the previous vTPM work done by
27 IBM and Intel corporation.
33 The architecture of vTPM is described below::
70 The Linux based guest that wants to use a vTPM. There may be
71 more than one of these.
74 Linux kernel virtual TPM frontend driver. This driver
75 provides vTPM access to a Linux-based DomU.
78 Mini-os TPM backend driver. The Linux frontend driver
79 connects to this backend driver to facilitate communications
80 between the Linux DomU and its vTPM. This driver is also
81 used by vtpmmgr-stubdom to communicate with vtpm-stubdom.
84 A mini-os stub domain that implements a vTPM. There is a
85 one to one mapping between running vtpm-stubdom instances and
86 logical vtpms on the system. The vTPM Platform Configuration
87 Registers (PCRs) are normally all initialized to zero.
90 Mini-os TPM frontend driver. The vTPM mini-os domain
91 vtpm-stubdom uses this driver to communicate with
92 vtpmmgr-stubdom. This driver is also used in mini-os
93 domains such as pv-grub that talk to the vTPM domain.
96 A mini-os domain that implements the vTPM manager. There is
97 only one vTPM manager and it should be running during the
98 entire lifetime of the machine. This domain regulates
99 access to the physical TPM on the system and secures the
100 persistent state of each vTPM.
103 Mini-os TPM version 1.2 TPM Interface Specification (TIS)
104 driver. This driver used by vtpmmgr-stubdom to talk directly to
105 the hardware TPM. Communication is facilitated by mapping
106 hardware memory pages into vtpmmgr-stubdom.
109 The physical TPM that is soldered onto the motherboard.
115 Support for the vTPM driver was added in Xen using the libxl toolstack in Xen
116 4.3. See the Xen documentation (docs/misc/vtpm.txt) for details on setting up
117 the vTPM and vTPM Manager stub domains. Once the stub domains are running, a
118 vTPM device is set up in the same manner as a disk or network device in the
119 domain's configuration file.
121 In order to use features such as IMA that require a TPM to be loaded prior to
122 the initrd, the xen-tpmfront driver must be compiled in to the kernel. If not
123 using such features, the driver can be compiled as a module and will be loaded