Commit | Line | Data |
---|---|---|
9e255e2b | 1 | ============================= |
e2683957 | 2 | Virtual TPM interface for Xen |
675aaf05 | 3 | ============================= |
e2683957 DDG |
4 | |
5 | Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA) | |
6 | ||
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. | |
10 | ||
675aaf05 MCC |
11 | Introduction |
12 | ------------ | |
e2683957 DDG |
13 | |
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. | |
25 | ||
26 | This mini-os vTPM subsystem was built on top of the previous vTPM work done by | |
27 | IBM and Intel corporation. | |
28 | ||
29 | ||
675aaf05 | 30 | Design Overview |
e2683957 DDG |
31 | --------------- |
32 | ||
675aaf05 MCC |
33 | The architecture of vTPM is described below:: |
34 | ||
35 | +------------------+ | |
36 | | Linux DomU | ... | |
37 | | | ^ | | |
38 | | v | | | |
39 | | xen-tpmfront | | |
40 | +------------------+ | |
41 | | ^ | |
42 | v | | |
43 | +------------------+ | |
44 | | mini-os/tpmback | | |
45 | | | ^ | | |
46 | | v | | | |
47 | | vtpm-stubdom | ... | |
48 | | | ^ | | |
49 | | v | | | |
50 | | mini-os/tpmfront | | |
51 | +------------------+ | |
52 | | ^ | |
53 | v | | |
54 | +------------------+ | |
55 | | mini-os/tpmback | | |
56 | | | ^ | | |
57 | | v | | | |
58 | | vtpmmgr-stubdom | | |
59 | | | ^ | | |
60 | | v | | | |
61 | | mini-os/tpm_tis | | |
62 | +------------------+ | |
63 | | ^ | |
64 | v | | |
65 | +------------------+ | |
66 | | Hardware TPM | | |
67 | +------------------+ | |
68 | ||
69 | * Linux DomU: | |
70 | The Linux based guest that wants to use a vTPM. There may be | |
e2683957 DDG |
71 | more than one of these. |
72 | ||
675aaf05 MCC |
73 | * xen-tpmfront.ko: |
74 | Linux kernel virtual TPM frontend driver. This driver | |
e2683957 DDG |
75 | provides vTPM access to a Linux-based DomU. |
76 | ||
675aaf05 MCC |
77 | * mini-os/tpmback: |
78 | Mini-os TPM backend driver. The Linux frontend driver | |
e2683957 DDG |
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. | |
82 | ||
675aaf05 MCC |
83 | * vtpm-stubdom: |
84 | A mini-os stub domain that implements a vTPM. There is a | |
e2683957 DDG |
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. | |
88 | ||
675aaf05 MCC |
89 | * mini-os/tpmfront: |
90 | Mini-os TPM frontend driver. The vTPM mini-os domain | |
e2683957 DDG |
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. | |
94 | ||
675aaf05 MCC |
95 | * vtpmmgr-stubdom: |
96 | A mini-os domain that implements the vTPM manager. There is | |
e2683957 DDG |
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. | |
101 | ||
675aaf05 MCC |
102 | * mini-os/tpm_tis: |
103 | Mini-os TPM version 1.2 TPM Interface Specification (TIS) | |
e2683957 DDG |
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. | |
107 | ||
675aaf05 MCC |
108 | * Hardware TPM: |
109 | The physical TPM that is soldered onto the motherboard. | |
e2683957 DDG |
110 | |
111 | ||
675aaf05 | 112 | Integration With Xen |
e2683957 DDG |
113 | -------------------- |
114 | ||
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. | |
120 | ||
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 | |
124 | as usual. |