qemu/qapi
Amarnath Valluri f4ede81eed tpm: Added support for TPM emulator
This change introduces a new TPM backend driver that can communicate with
swtpm(software TPM emulator) using unix domain socket interface. QEMU talks to
the TPM emulator using QEMU's socket-based chardev backend device.

Swtpm uses two Unix sockets for communications, one for plain TPM commands and
responses, and one for out-of-band control messages. QEMU passes the data
socket to be used over the control channel.

The swtpm and associated tools can be found here:
    https://github.com/stefanberger/swtpm

The swtpm's control channel protocol specification can be found here:
    https://github.com/stefanberger/swtpm/wiki/Control-Channel-Specification

Usage:
    # setup TPM state directory
    mkdir /tmp/mytpm
    chown -R tss:root /tmp/mytpm
    /usr/bin/swtpm_setup --tpm-state /tmp/mytpm --createek

    # Ask qemu to use TPM emulator with given tpm state directory
    qemu-system-x86_64 \
        [...] \
        -chardev socket,id=chrtpm,path=/tmp/swtpm-sock \
        -tpmdev emulator,id=tpm0,chardev=chrtpm \
        -device tpm-tis,tpmdev=tpm0 \
        [...]

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-10-13 07:34:33 -04:00
..
block-core.json block: Add blkdebug hook for copy-on-read 2017-10-06 16:28:58 +02:00
block.json
char.json
common.json
crypto.json
introspect.json
Makefile.objs
migration.json migration: Create x-multifd-page-count parameter 2017-09-22 14:11:21 +02:00
net.json
opts-visitor.c
qapi-clone-visitor.c
qapi-dealloc-visitor.c
qapi-util.c qapi: Change data type of the FOO_lookup generated for enum FOO 2017-09-04 13:09:13 +02:00
qapi-visit-core.c qapi: Change data type of the FOO_lookup generated for enum FOO 2017-09-04 13:09:13 +02:00
qmp-dispatch.c qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
qmp-event.c
qmp-registry.c
qobject-input-visitor.c
qobject-output-visitor.c
rocker.json
run-state.json qapi: Rename WatchdogExpirationAction enum 2017-10-02 08:40:01 +02:00
sockets.json
string-input-visitor.c
string-output-visitor.c
tpm.json tpm: Added support for TPM emulator 2017-10-13 07:34:33 -04:00
trace-events
trace.json
transaction.json
ui.json