File Index
Files and directories
Sign in
FILE

xen-tpmfront.rst

File preview with syntax highlighting.

linux-6.19.14/Documentation/security/tpm/xen-tpmfront.rst RESTRUCTUREDTEXT
  1=============================
  2Virtual TPM interface for Xen
  3=============================
  4
  5Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
  6
  7This document describes the virtual Trusted Platform Module (vTPM) subsystem for
  8Xen. The reader is assumed to have familiarity with building and installing Xen,
  9Linux, and a basic understanding of the TPM and vTPM concepts.
 10
 11Introduction
 12------------
 13
 14The goal of this work is to provide a TPM functionality to a virtual guest
 15operating system (in Xen terms, a DomU).  This allows programs to interact with
 16a TPM in a virtual system the same way they interact with a TPM on the physical
 17system.  Each guest gets its own unique, emulated, software TPM.  However, each
 18of the vTPM's secrets (Keys, NVRAM, etc) are managed by a vTPM Manager domain,
 19which seals the secrets to the Physical TPM.  If the process of creating each of
 20these domains (manager, vTPM, and guest) is trusted, the vTPM subsystem extends
 21the chain of trust rooted in the hardware TPM to virtual machines in Xen. Each
 22major component of vTPM is implemented as a separate domain, providing secure
 23separation guaranteed by the hypervisor. The vTPM domains are implemented in
 24mini-os to reduce memory and processor overhead.
 25
 26This mini-os vTPM subsystem was built on top of the previous vTPM work done by
 27IBM and Intel corporation.
 28
 29
 30Design Overview
 31---------------
 32
 33The 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
 71	       more than one of these.
 72
 73* xen-tpmfront.ko:
 74		    Linux kernel virtual TPM frontend driver. This driver
 75                    provides vTPM access to a Linux-based DomU.
 76
 77* mini-os/tpmback:
 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.
 82
 83* 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.
 88
 89* mini-os/tpmfront:
 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.
 94
 95* vtpmmgr-stubdom:
 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.
101
102* mini-os/tpm_tis:
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.
107
108* Hardware TPM:
109		The physical TPM that is soldered onto the motherboard.
110
111
112Integration With Xen
113--------------------
114
115Support for the vTPM driver was added in Xen using the libxl toolstack in Xen
1164.3.  See the Xen documentation (docs/misc/vtpm.txt) for details on setting up
117the vTPM and vTPM Manager stub domains.  Once the stub domains are running, a
118vTPM device is set up in the same manner as a disk or network device in the
119domain's configuration file.
120
121In order to use features such as IMA that require a TPM to be loaded prior to
122the initrd, the xen-tpmfront driver must be compiled in to the kernel.  If not
123using such features, the driver can be compiled as a module and will be loaded
124as usual.
~/ Read-only file preview.