1:orphan:
2
3=============================
4Virtual TPM interface for Xen
5=============================
6
7Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
8
9This document describes the virtual Trusted Platform Module (vTPM) subsystem for
10Xen. The reader is assumed to have familiarity with building and installing Xen,
11Linux, and a basic understanding of the TPM and vTPM concepts.
12
13Introduction
14------------
15
16The goal of this work is to provide a TPM functionality to a virtual guest
17operating system (in Xen terms, a DomU).  This allows programs to interact with
18a TPM in a virtual system the same way they interact with a TPM on the physical
19system.  Each guest gets its own unique, emulated, software TPM.  However, each
20of the vTPM's secrets (Keys, NVRAM, etc) are managed by a vTPM Manager domain,
21which seals the secrets to the Physical TPM.  If the process of creating each of
22these domains (manager, vTPM, and guest) is trusted, the vTPM subsystem extends
23the chain of trust rooted in the hardware TPM to virtual machines in Xen. Each
24major component of vTPM is implemented as a separate domain, providing secure
25separation guaranteed by the hypervisor. The vTPM domains are implemented in
26mini-os to reduce memory and processor overhead.
27
28This mini-os vTPM subsystem was built on top of the previous vTPM work done by
29IBM and Intel corporation.
30
31
32Design Overview
33---------------
34
35The architecture of vTPM is described below::
36
37  +------------------+
38  |    Linux DomU    | ...
39  |       |  ^       |
40  |       v  |       |
41  |   xen-tpmfront   |
42  +------------------+
43          |  ^
44          v  |
45  +------------------+
46  | mini-os/tpmback  |
47  |       |  ^       |
48  |       v  |       |
49  |  vtpm-stubdom    | ...
50  |       |  ^       |
51  |       v  |       |
52  | mini-os/tpmfront |
53  +------------------+
54          |  ^
55          v  |
56  +------------------+
57  | mini-os/tpmback  |
58  |       |  ^       |
59  |       v  |       |
60  | vtpmmgr-stubdom  |
61  |       |  ^       |
62  |       v  |       |
63  | mini-os/tpm_tis  |
64  +------------------+
65          |  ^
66          v  |
67  +------------------+
68  |   Hardware TPM   |
69  +------------------+
70
71* Linux DomU:
72	       The Linux based guest that wants to use a vTPM. There may be
73	       more than one of these.
74
75* xen-tpmfront.ko:
76		    Linux kernel virtual TPM frontend driver. This driver
77                    provides vTPM access to a Linux-based DomU.
78
79* mini-os/tpmback:
80		    Mini-os TPM backend driver. The Linux frontend driver
81		    connects to this backend driver to facilitate communications
82		    between the Linux DomU and its vTPM. This driver is also
83		    used by vtpmmgr-stubdom to communicate with vtpm-stubdom.
84
85* vtpm-stubdom:
86		 A mini-os stub domain that implements a vTPM. There is a
87		 one to one mapping between running vtpm-stubdom instances and
88                 logical vtpms on the system. The vTPM Platform Configuration
89                 Registers (PCRs) are normally all initialized to zero.
90
91* mini-os/tpmfront:
92		     Mini-os TPM frontend driver. The vTPM mini-os domain
93		     vtpm-stubdom uses this driver to communicate with
94		     vtpmmgr-stubdom. This driver is also used in mini-os
95		     domains such as pv-grub that talk to the vTPM domain.
96
97* vtpmmgr-stubdom:
98		    A mini-os domain that implements the vTPM manager. There is
99		    only one vTPM manager and it should be running during the
100		    entire lifetime of the machine.  This domain regulates
101		    access to the physical TPM on the system and secures the
102		    persistent state of each vTPM.
103
104* mini-os/tpm_tis:
105		    Mini-os TPM version 1.2 TPM Interface Specification (TIS)
106                    driver. This driver used by vtpmmgr-stubdom to talk directly to
107                    the hardware TPM. Communication is facilitated by mapping
108                    hardware memory pages into vtpmmgr-stubdom.
109
110* Hardware TPM:
111		The physical TPM that is soldered onto the motherboard.
112
113
114Integration With Xen
115--------------------
116
117Support for the vTPM driver was added in Xen using the libxl toolstack in Xen
1184.3.  See the Xen documentation (docs/misc/vtpm.txt) for details on setting up
119the vTPM and vTPM Manager stub domains.  Once the stub domains are running, a
120vTPM device is set up in the same manner as a disk or network device in the
121domain's configuration file.
122
123In order to use features such as IMA that require a TPM to be loaded prior to
124the initrd, the xen-tpmfront driver must be compiled in to the kernel.  If not
125using such features, the driver can be compiled as a module and will be loaded
126as usual.
127