0001 =============================
0002 Virtual TPM interface for Xen
0003 =============================
0004
0005 Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
0006
0007 This document describes the virtual Trusted Platform Module (vTPM) subsystem for
0008 Xen. The reader is assumed to have familiarity with building and installing Xen,
0009 Linux, and a basic understanding of the TPM and vTPM concepts.
0010
0011 Introduction
0012 ------------
0013
0014 The goal of this work is to provide a TPM functionality to a virtual guest
0015 operating system (in Xen terms, a DomU). This allows programs to interact with
0016 a TPM in a virtual system the same way they interact with a TPM on the physical
0017 system. Each guest gets its own unique, emulated, software TPM. However, each
0018 of the vTPM's secrets (Keys, NVRAM, etc) are managed by a vTPM Manager domain,
0019 which seals the secrets to the Physical TPM. If the process of creating each of
0020 these domains (manager, vTPM, and guest) is trusted, the vTPM subsystem extends
0021 the chain of trust rooted in the hardware TPM to virtual machines in Xen. Each
0022 major component of vTPM is implemented as a separate domain, providing secure
0023 separation guaranteed by the hypervisor. The vTPM domains are implemented in
0024 mini-os to reduce memory and processor overhead.
0025
0026 This mini-os vTPM subsystem was built on top of the previous vTPM work done by
0027 IBM and Intel corporation.
0028
0029
0030 Design Overview
0031 ---------------
0032
0033 The architecture of vTPM is described below::
0034
0035 +------------------+
0036 | Linux DomU | ...
0037 | | ^ |
0038 | v | |
0039 | xen-tpmfront |
0040 +------------------+
0041 | ^
0042 v |
0043 +------------------+
0044 | mini-os/tpmback |
0045 | | ^ |
0046 | v | |
0047 | vtpm-stubdom | ...
0048 | | ^ |
0049 | v | |
0050 | mini-os/tpmfront |
0051 +------------------+
0052 | ^
0053 v |
0054 +------------------+
0055 | mini-os/tpmback |
0056 | | ^ |
0057 | v | |
0058 | vtpmmgr-stubdom |
0059 | | ^ |
0060 | v | |
0061 | mini-os/tpm_tis |
0062 +------------------+
0063 | ^
0064 v |
0065 +------------------+
0066 | Hardware TPM |
0067 +------------------+
0068
0069 * Linux DomU:
0070 The Linux based guest that wants to use a vTPM. There may be
0071 more than one of these.
0072
0073 * xen-tpmfront.ko:
0074 Linux kernel virtual TPM frontend driver. This driver
0075 provides vTPM access to a Linux-based DomU.
0076
0077 * mini-os/tpmback:
0078 Mini-os TPM backend driver. The Linux frontend driver
0079 connects to this backend driver to facilitate communications
0080 between the Linux DomU and its vTPM. This driver is also
0081 used by vtpmmgr-stubdom to communicate with vtpm-stubdom.
0082
0083 * vtpm-stubdom:
0084 A mini-os stub domain that implements a vTPM. There is a
0085 one to one mapping between running vtpm-stubdom instances and
0086 logical vtpms on the system. The vTPM Platform Configuration
0087 Registers (PCRs) are normally all initialized to zero.
0088
0089 * mini-os/tpmfront:
0090 Mini-os TPM frontend driver. The vTPM mini-os domain
0091 vtpm-stubdom uses this driver to communicate with
0092 vtpmmgr-stubdom. This driver is also used in mini-os
0093 domains such as pv-grub that talk to the vTPM domain.
0094
0095 * vtpmmgr-stubdom:
0096 A mini-os domain that implements the vTPM manager. There is
0097 only one vTPM manager and it should be running during the
0098 entire lifetime of the machine. This domain regulates
0099 access to the physical TPM on the system and secures the
0100 persistent state of each vTPM.
0101
0102 * mini-os/tpm_tis:
0103 Mini-os TPM version 1.2 TPM Interface Specification (TIS)
0104 driver. This driver used by vtpmmgr-stubdom to talk directly to
0105 the hardware TPM. Communication is facilitated by mapping
0106 hardware memory pages into vtpmmgr-stubdom.
0107
0108 * Hardware TPM:
0109 The physical TPM that is soldered onto the motherboard.
0110
0111
0112 Integration With Xen
0113 --------------------
0114
0115 Support for the vTPM driver was added in Xen using the libxl toolstack in Xen
0116 4.3. See the Xen documentation (docs/misc/vtpm.txt) for details on setting up
0117 the vTPM and vTPM Manager stub domains. Once the stub domains are running, a
0118 vTPM device is set up in the same manner as a disk or network device in the
0119 domain's configuration file.
0120
0121 In order to use features such as IMA that require a TPM to be loaded prior to
0122 the initrd, the xen-tpmfront driver must be compiled in to the kernel. If not
0123 using such features, the driver can be compiled as a module and will be loaded
0124 as usual.