From: Quan Xu <quan.xu@intel.com>
To: stefano.stabellini@eu.citrix.com, stefanb@linux.vnet.ibm.com,
eblake@redhat.com
Cc: wei.liu2@citrix.com, Quan Xu <quan.xu@intel.com>,
qemu-devel@nongnu.org, xen-devel@lists.xen.org,
aliguori@amazon.com, pbonzini@redhat.com, dgdegra@tycho.nsa.gov
Subject: [Qemu-devel] [PATCH v5 0/6] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU patch)
Date: Fri, 10 Apr 2015 02:59:13 -0400 [thread overview]
Message-ID: <1428649159-30879-1-git-send-email-quan.xu@intel.com> (raw)
*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 v5:
-Add a parameter indicating whether the command that was a selftest
and whether it completed successfully.
-comments enhancement.
-Pass the size of the buff for vtpm_recv()|vtpm_send().
-qapi schema enhancement.
Quan Xu (6):
Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options
Qemu-Xen-vTPM: Xen frontend driver infrastructure
Qemu-Xen-vTPM: Xen frontend driver infrastructure
Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.
Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
Qemu-Xen-vTPM: Add a parameter indicating whether the command that was
a selftest
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 | 50 ++++
hw/tpm/tpm_xenstubdoms.c | 278 ++++++++++++++++++++++
hw/tpm/xen_vtpm_frontend.c | 321 ++++++++++++++++++++++++++
hw/xen/Makefile.objs | 2 +-
hw/xen/xen_backend.c | 353 ----------------------------
hw/xen/xen_frontend.c | 365 +++++++++++++++++++++++++++++
hw/xen/xen_pvdev.c | 481 +++++++++++++++++++++++++++++++++++++++
include/hw/xen/xen_backend.h | 29 ++-
include/hw/xen/xen_common.h | 6 +
include/sysemu/tpm_backend_int.h | 1 +
qapi-schema.json | 17 +-
qemu-options.hx | 13 +-
tpm.c | 7 +-
vl.c | 17 +-
xen-hvm.c | 5 +
20 files changed, 1600 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
next reply other threads:[~2015-04-10 12:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 6:59 Quan Xu [this message]
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 1/6] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options Quan Xu
2015-04-10 13:22 ` Eric Blake
2015-04-13 2:32 ` Xu, Quan
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 2/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure Quan Xu
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 3/6] " Quan Xu
2015-04-15 14:44 ` Stefan Berger
2015-04-15 15:07 ` Daniel De Graaf
2015-04-16 1:03 ` Xu, Quan
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 4/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen Quan Xu
2015-04-15 14:50 ` Stefan Berger
2015-04-16 1:07 ` Xu, Quan
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 5/6] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init() Quan Xu
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 6/6] Qemu-Xen-vTPM: Add a parameter indicating whether the command that was a selftest Quan Xu
2015-04-12 20:50 ` Stefan Berger
2015-04-13 2:15 ` Xu, Quan
2015-04-15 14:56 ` Stefan Berger
2015-04-16 1:04 ` Xu, Quan
2015-04-13 22:35 ` Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428649159-30879-1-git-send-email-quan.xu@intel.com \
--to=quan.xu@intel.com \
--cc=aliguori@amazon.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).