xen-tpmfront.rst 4.5 KB

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