xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/7] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part)
@ 2015-05-17  5:20 Quan Xu
  2015-05-17  5:20 ` Quan Xu
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Quan Xu @ 2015-05-17  5:20 UTC (permalink / raw)
  To: stefano.stabellini, qemu-devel
  Cc: wei.liu2, stefanb, xen-devel, Quan Xu, dgdegra, eblake

*INTRODUCTION*
The goal of virtual Trusted Platform Module (vTPM) is to provide a TPM functionality to virtual machines (Fedora, Ubuntu, Redhat, Windows .etc). This allows programs to interact with a TPM in a virtual machine the same way they interact with a TPM on the physical system. Each virtual machine gets its own unique, emulated, software TPM. Each major component of vTPM is implemented as a stubdom, providing secure separation guaranteed by the hypervisor.

The vTPM stubdom is a Xen mini-OS domain that emulates a TPM for the virtual machine to use. It is a small wrapper around the Berlios TPM emulator. TPM commands are passed from mini-os TPM backend driver.

*ARCHITECTURE*
The architecture of stubdom vTPM for HVM virtual machine:

            +--------------------+
            | Windows/Linux DomU | ...
            |        |  ^        |
            |        v  |        |
            |  Qemu tpm1.2 Tis   |
            |        |  ^        |
            |        v  |        |
            | XenStubdoms backend|
            +--------------------+
                     |  ^
                     v  |
            +--------------------+
            |      XenDevOps     |
            +--------------------+
                     |  ^
                     v  |
            +--------------------+
            |  mini-os/tpmback   |
            |        |  ^        |
            |        v  |        |
            |   vtpm-stubdom     | ...
            |        |  ^        |
            |        v  |        |
            |  mini-os/tpmfront  |
            +--------------------+
                     |  ^
                     v  |
            +--------------------+
            |  mini-os/tpmback   |
            |        |  ^        |
            |        v  |        |
            |  vtpmmgr-stubdom   |
            |        |  ^        |
            |        v  |        |
            |  mini-os/tpm_tis   |
            +--------------------+
                     |  ^
                     v  |
            +--------------------+
            |    Hardware TPM    |
            +--------------------+

 * Windows/Linux DomU:
    The HVM based guest that wants to use a vTPM. There may be
    more than one of these.

 * Qemu tpm1.2 Tis:
    Implementation of the tpm1.2 Tis interface for HVM virtual
    machines. It is Qemu emulation device.

 * vTPM xenstubdoms driver:
    Qemu vTPM driver. This driver provides vtpm initialization
    and sending data and commends to a para-virtualized vtpm
    stubdom.

 * XenDevOps:
    Register Xen stubdom vTPM frontend driver, and transfer any
    request/repond between TPM xenstubdoms driver and Xen vTPM
    stubdom. Facilitate communications between Xen vTPM stubdom
    and vTPM xenstubdoms driver.

 * mini-os/tpmback:
    Mini-os TPM backend driver. The Linux frontend driver connects
    to this backend driver to facilitate communications between the
    Linux DomU and its vTPM. This driver is also used by vtpmmgr
    stubdom to communicate with vtpm-stubdom.

 * vtpm-stubdom:
    A mini-os stub domain that implements a vTPM. There is a
    one to one mapping between running vtpm-stubdom instances and
    logical vtpms on the system. The vTPM Platform Configuration
    Registers (PCRs) are all initialized to zero.

 * mini-os/tpmfront:
    Mini-os TPM frontend driver. The vTPM mini-os domain vtpm
    stubdom uses this driver to communicate with vtpmmgr-stubdom.
    This driver could also be used separately to implement a mini-os
    domain that wishes to use a vTPM of its own.

 * vtpmmgr-stubdom:
    A mini-os domain that implements the vTPM manager. There is only
    one vTPM manager and it should be running during the entire lifetime
    of the machine. vtpmmgr domain securely stores encryption keys for
    each of the vtpms and accesses to the hardware TPM to get the root of
    trust for the entire system.

 * mini-os/tpm_tis:
    Mini-os TPM version 1.2 TPM Interface Specification (TIS) driver.
    This driver used by vtpmmgr-stubdom to talk directly to the hardware
    TPM. Communication is facilitated by mapping hardware memory pages
    into vtpmmgr stubdom.

 * Hardware TPM: The physical TPM 1.2 that is soldered onto the motherboard.

--Changes in v8:
 -split patch#2 in two, patch#2 and patch#3.

Quan Xu (7):
  Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options
  Qemu-Xen-vTPM: Create a new file xen_pvdev.c
  Qemu-Xen-vTPM: Xen frontend driver infrastructure
  Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver
  Qemu-Xen-vTPM: Move tpm_passthrough_is_selftest() into tpm_util.c
  Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.
  Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()

 configure                        |  14 ++
 hmp.c                            |   2 +
 hw/display/xenfb.c               |   4 +-
 hw/tpm/Makefile.objs             |   3 +-
 hw/tpm/tpm_passthrough.c         |  13 +-
 hw/tpm/tpm_util.c                |  39 ++++
 hw/tpm/tpm_xenstubdoms.c         | 276 ++++++++++++++++++++++
 hw/tpm/xen_vtpm_frontend.c       | 335 +++++++++++++++++++++++++++
 hw/xen/Makefile.objs             |   2 +-
 hw/xen/xen_backend.c             | 353 ----------------------------
 hw/xen/xen_frontend.c            | 345 ++++++++++++++++++++++++++++
 hw/xen/xen_pvdev.c               | 481 +++++++++++++++++++++++++++++++++++++++
 include/hw/xen/xen_backend.h     |  26 ++-
 include/hw/xen/xen_common.h      |   6 +
 include/sysemu/tpm_backend_int.h |   1 +
 qapi-schema.json                 |  16 +-
 qemu-options.hx                  |  13 +-
 tpm.c                            |   7 +-
 vl.c                             |  17 +-
 xen-hvm.c                        |   5 +
 20 files changed, 1577 insertions(+), 381 deletions(-)
 create mode 100644 hw/tpm/tpm_util.c
 create mode 100644 hw/tpm/tpm_xenstubdoms.c
 create mode 100644 hw/tpm/xen_vtpm_frontend.c
 create mode 100644 hw/xen/xen_frontend.c
 create mode 100644 hw/xen/xen_pvdev.c

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-02-14  5:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-17  5:20 [PATCH v8 0/7] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part) Quan Xu
2015-05-17  5:20 ` Quan Xu
2015-05-17  5:20 ` [PATCH v8 1/7] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options Quan Xu
2015-05-17  5:20 ` [PATCH v8 2/7] Qemu-Xen-vTPM: Create a new file xen_pvdev.c Quan Xu
2015-06-22 16:37   ` Stefano Stabellini
     [not found]   ` <alpine.DEB.2.02.1506221732260.4824@kaball.uk.xensource.com>
2015-06-23  6:43     ` Xu, Quan
     [not found]     ` <945CA011AD5F084CBEA3E851C0AB28890E930C91@SHSMSX101.ccr.corp.intel.com>
2015-06-23 10:56       ` Stefano Stabellini
2016-02-14  5:55     ` Xu, Quan
2015-05-17  5:20 ` [PATCH v8 3/7] Qemu-Xen-vTPM: Xen frontend driver infrastructure Quan Xu
2015-06-22 17:40   ` Stefano Stabellini
2015-05-17  5:20 ` [PATCH v8 4/7] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver Quan Xu
2015-06-22 16:55   ` Stefano Stabellini
2015-05-17  5:20 ` [PATCH v8 5/7] Qemu-Xen-vTPM: Move tpm_passthrough_is_selftest() into tpm_util.c Quan Xu
2015-05-17  5:20 ` [PATCH v8 6/7] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen Quan Xu
2015-05-17  5:20 ` [PATCH v8 7/7] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init() Quan Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).