From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: stefanb@linux.vnet.ibm.com, qemu-devel@nongnu.org, anthony@codemonkey.ws
Cc: andreas.niederl@iaik.tugraz.at, mst@redhat.com
Subject: [Qemu-devel] [PATCH V14 0/7] Qemu Trusted Platform Module (TPM) integration
Date: Wed, 14 Dec 2011 08:43:15 -0500 [thread overview]
Message-ID: <1323870202-25742-1-git-send-email-stefanb@linux.vnet.ibm.com> (raw)
The following series of patches adds TPM (Trusted Platform Module) support
to Qemu. An emulator for the TIS (TPM Interface Spec) interface is
added that provides the basis for accessing a 'backend' implementing the actual
TPM functionality. The TIS emulator serves as a 'frontend' enabling for
example Linux's TPM TIS (tpm_tis) driver.
In this series I am posting a backend implementation that makes use of the
host's TPM through a passthrough driver, which on Linux is accessed
using /dev/tpm0.
v14:
- applies to checkout of da5361c (Dec 12)
- implemented Anthony Liguori's suggestions
- dropping the version log on individual patches
v13:
- applies to checkout of 61a5872 (Dec 12)
- only allowing character devices as fd parameter
- fixing error path in tpm_tis_init
v12:
- applies to checkout of ebffe2a (Oct 11)
- added documentation for fd parameter
- nits
v11:
- applies to checkout of 46f3069 (Sep 28)
- some filing on the documentation
- small nits fixed
v10:
- applies to checkout of 1ce9ce6 (Sep 27)
- addressed Michael Tsirkin's comments on v9
v9:
- addressed Michael Tsirkin's and other reviewers' comments
- only posting Andreas Niederl's passthrough driver as the backend driver
v8:
- applies to checkout of f0fb8b7 (Aug 30)
- fixing compilation error pointed out by Andreas Niederl
- adding patch that allows to feed an initial state into the libtpms TPM
- following memory API changes (glib) where necessary
v7:
- applies to checkout of b9c6cbf (Aug 9)
- measuring the modules if multiboot is used
- coding style fixes
v6:
- applies to checkout of 75ef849 (July 2nd)
- some fixes and improvements to existing patches; see individual patches
- added a patch with a null driver responding to all TPM requests with
a response indicating failure; this backend has no dependencies and
can alwayy be built;
- added a patch to support the hashing of kernel, ramfs and command line
if those were passed to Qemu using -kernel, -initrd and -append
respectively. Measurements are taken, logged, and passed to SeaBIOS using
the firmware interface.
- libtpms revision 7 now requires 83kb of block storage due to having more
NVRAM space
v5:
- applies to checkout of 1fddfba1
- adding support for split command line using the -tpmdev ... -device ...
options while keeping the -tpm option
- support for querying the device models using -tpm model=?
- support for monitor 'info tpm'
- adding documentation of command line options for man page and web page
- increasing room for ACPI tables that qemu reserves to 128kb (from 64kb)
- adding (experimental) support for block migration
- adding (experimental) support for taking measurements when kernel,
initrd and kernel command line are directly passed to Qemu
v4:
- applies to checkout of d2d979c6
- more coding style fixes
- adding patch for supporting blob encryption (in addition to the existing
QCoW2-level encryption)
- this allows for graceful termination of a migration if the target
is detected to have a wrong key
- tested with big and little endian hosts
- main thread releases mutex while checking for work to do on behalf of
backend
- introducing file locking (fcntl) on the block layer for serializing access
to shared (QCoW2) files (used during migration)
v3:
- Building a null driver at patch 5/8 that responds to all requests
with an error response; subsequently this driver is transformed to the
libtpms-based driver for real TPM functionality
- Reworked the threading; dropped the patch for qemu_thread_join; the
main thread synchronizing with the TPM thread termination may need
to write data to the block storage while waiting for the thread to
terminate; did not previously show a problem but is safer
- A lot of testing based on recent git checkout 4b4a72e5 (4/10):
- migration of i686 VM from x86_64 host to i686 host to ppc64 host while
running tests inside the VM
- tests with S3 suspend/resume
- tests with snapshots
- multiple-hour tests with VM suspend/resume (using virsh save/restore)
while running a TPM test suite inside the VM
All tests passed; [not all of them were done on the ppc64 host]
v2:
- splitting some of the patches into smaller ones for easier review
- fixes in individual patches
Regards,
Stefan
Stefan Berger (7):
Support for TPM command line options
Add TPM (frontend) hardware interface (TPM TIS) to Qemu
Add a debug register
Build the TPM frontend code
Add a TPM Passthrough backend driver implementation
Introduce --enable-tpm-passthrough configure option
Add fd parameter for TPM passthrough driver
Makefile.target | 3 +
configure | 28 ++
hmp-commands.hx | 2 +
hmp.c | 28 ++
hmp.h | 1 +
hw/tpm_passthrough.c | 528 ++++++++++++++++++++++++++++++
hw/tpm_tis.c | 877 ++++++++++++++++++++++++++++++++++++++++++++++++++
hw/tpm_tis.h | 80 +++++
monitor.c | 8 +
qapi-schema.json | 29 ++
qemu-config.c | 25 ++
qemu-options.hx | 67 ++++
tpm.c | 230 +++++++++++++
tpm.h | 119 +++++++
vl.c | 20 ++
15 files changed, 2045 insertions(+), 0 deletions(-)
create mode 100644 hw/tpm_passthrough.c
create mode 100644 hw/tpm_tis.c
create mode 100644 hw/tpm_tis.h
create mode 100644 tpm.c
create mode 100644 tpm.h
--
1.7.6.4
next reply other threads:[~2011-12-14 13:47 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 13:43 Stefan Berger [this message]
2011-12-14 13:43 ` [Qemu-devel] [PATCH V14 1/7] Support for TPM command line options Stefan Berger
2011-12-14 13:43 ` [Qemu-devel] [PATCH V14 2/7] Add TPM (frontend) hardware interface (TPM TIS) to Qemu Stefan Berger
2012-02-20 8:51 ` Michael S. Tsirkin
2012-02-20 15:48 ` Stefan Berger
2012-02-20 19:37 ` Michael S. Tsirkin
2012-02-20 19:58 ` Stefan Berger
2012-02-23 20:47 ` Stefan Berger
2012-02-20 22:02 ` Michael S. Tsirkin
2012-02-21 0:43 ` Stefan Berger
2012-02-21 3:18 ` Michael S. Tsirkin
2012-02-21 11:19 ` Stefan Berger
2012-02-21 12:18 ` Michael S. Tsirkin
2012-02-21 15:05 ` Stefan Berger
2012-02-21 19:58 ` Michael S. Tsirkin
2012-02-21 22:30 ` Stefan Berger
2012-02-21 23:08 ` Michael S. Tsirkin
2012-02-22 0:21 ` Stefan Berger
2012-02-22 4:34 ` Michael S. Tsirkin
2012-02-22 15:03 ` Stefan Berger
2012-02-22 17:55 ` Stefan Berger
2012-03-02 12:02 ` Stefan Berger
2012-03-04 22:59 ` Michael S. Tsirkin
2012-03-05 15:44 ` Stefan Berger
2012-03-05 15:46 ` Stefan Berger
2011-12-14 13:43 ` [Qemu-devel] [PATCH V14 3/7] Add a debug register Stefan Berger
2011-12-14 13:43 ` [Qemu-devel] [PATCH V14 4/7] Build the TPM frontend code Stefan Berger
2011-12-14 13:43 ` [Qemu-devel] [PATCH V14 5/7] Add a TPM Passthrough backend driver implementation Stefan Berger
2012-02-20 19:51 ` Michael S. Tsirkin
2012-02-20 20:25 ` Stefan Berger
2012-02-20 21:15 ` Michael S. Tsirkin
2012-02-21 1:03 ` Stefan Berger
2012-03-21 23:27 ` Anthony Liguori
2012-02-20 20:01 ` Michael S. Tsirkin
2012-02-20 21:12 ` Stefan Berger
2012-02-20 21:30 ` Michael S. Tsirkin
2012-02-21 0:30 ` Stefan Berger
2011-12-14 13:43 ` [Qemu-devel] [PATCH V14 6/7] Introduce --enable-tpm-passthrough configure option Stefan Berger
2011-12-14 13:43 ` [Qemu-devel] [PATCH V14 7/7] Add fd parameter for TPM passthrough driver Stefan Berger
2012-01-12 16:59 ` [Qemu-devel] [PATCH V14 0/7] Qemu Trusted Platform Module (TPM) integration Paul Moore
2012-01-16 19:21 ` Paul Moore
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=1323870202-25742-1-git-send-email-stefanb@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=andreas.niederl@iaik.tugraz.at \
--cc=anthony@codemonkey.ws \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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).