xen-tpmfront.txt 4.3 KB

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