125 lines · plain
1=============================2Virtual TPM interface for Xen3=============================4 5Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)6 7This document describes the virtual Trusted Platform Module (vTPM) subsystem for8Xen. The reader is assumed to have familiarity with building and installing Xen,9Linux, and a basic understanding of the TPM and vTPM concepts.10 11Introduction12------------13 14The goal of this work is to provide a TPM functionality to a virtual guest15operating system (in Xen terms, a DomU). This allows programs to interact with16a TPM in a virtual system the same way they interact with a TPM on the physical17system. Each guest gets its own unique, emulated, software TPM. However, each18of 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 of20these domains (manager, vTPM, and guest) is trusted, the vTPM subsystem extends21the chain of trust rooted in the hardware TPM to virtual machines in Xen. Each22major component of vTPM is implemented as a separate domain, providing secure23separation guaranteed by the hypervisor. The vTPM domains are implemented in24mini-os to reduce memory and processor overhead.25 26This mini-os vTPM subsystem was built on top of the previous vTPM work done by27IBM and Intel corporation.28 29 30Design Overview31---------------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 be71 more than one of these.72 73* xen-tpmfront.ko:74 Linux kernel virtual TPM frontend driver. This driver75 provides vTPM access to a Linux-based DomU.76 77* mini-os/tpmback:78 Mini-os TPM backend driver. The Linux frontend driver79 connects to this backend driver to facilitate communications80 between the Linux DomU and its vTPM. This driver is also81 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 a85 one to one mapping between running vtpm-stubdom instances and86 logical vtpms on the system. The vTPM Platform Configuration87 Registers (PCRs) are normally all initialized to zero.88 89* mini-os/tpmfront:90 Mini-os TPM frontend driver. The vTPM mini-os domain91 vtpm-stubdom uses this driver to communicate with92 vtpmmgr-stubdom. This driver is also used in mini-os93 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 is97 only one vTPM manager and it should be running during the98 entire lifetime of the machine. This domain regulates99 access to the physical TPM on the system and secures the100 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 to105 the hardware TPM. Communication is facilitated by mapping106 hardware memory pages into vtpmmgr-stubdom.107 108* Hardware TPM:109 The physical TPM that is soldered onto the motherboard.110 111 112Integration With Xen113--------------------114 115Support for the vTPM driver was added in Xen using the libxl toolstack in Xen1164.3. See the Xen documentation (docs/misc/vtpm.txt) for details on setting up117the vTPM and vTPM Manager stub domains. Once the stub domains are running, a118vTPM device is set up in the same manner as a disk or network device in the119domain's configuration file.120 121In order to use features such as IMA that require a TPM to be loaded prior to122the initrd, the xen-tpmfront driver must be compiled in to the kernel. If not123using such features, the driver can be compiled as a module and will be loaded124as usual.125