Skip to content

tpm: Provide a software vTPM

Corey Bryant qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tpm: Add TPM NVRAM implementationhw/tpm/tpm_nvram.c hw/tpm/tpm_nvram.h+365 -00 replies
2/4tpm: Share tpm_write_fatal_error_responsehw/tpm/tpm_passthrough.c hw/tpm/tpm_tis.h include/sysemu/tpm_backend.h +1 more+22 -140 replies
3/4tpm: QMP/HMP support for libtpms TPM backendhmp.c include/sysemu/tpm_backend.h qapi-schema.json +1 more+29 -23 replies
4/4tpm: Provide libtpms software TPM backendconfigure hw/tpm/Makefile.objs hw/tpm/tpm_libtpms.c +2 more+941 -31 reply

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchStefan HajnocziEric Blake
1/4R-b
2/4
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] tpm: Provide a software vTPM

This patch series provides support for a software Trusted Platform Module (otherwise known as a vTPM). This support is provided via a new backend that works with the existing QEMU tpm-tis front end.

With this patch series, multiple guests can run with their own vTPM. In comparison, the existing passthrough vTPM does not allow this because the host TPM cannot be shared.

Note: There is seabios code that is not yet upstream that is required to run with this support. It provides support such as initialization, ACPI table updates, and menu updates. If anyone would like to run with that support, let me know and I can send you a bios.bin.

Following is a sample command line:

qemu-img create -f qcow2 /home/qemu/images/nvram.qcow2 500K

qemu-system-x86_64 ... \
-drive file=/home/qemu/images/nvram.qcow2,if=none,id=nvram0-0-0,format=qcow2 \
-device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 \
-tpmdev libtpms,id=tpm-tpm0,nvram=nvram0-0-0

Corey Bryant (4):
tpm: Add TPM NVRAM implementation
tpm: Share tpm_write_fatal_error_response
tpm: QMP/HMP support for libtpms TPM backend
tpm: Provide libtpms software TPM backend

 configure                    |   24 ++
 hmp.c                        |    5 +
 hw/tpm/Makefile.objs         |    2 +
 hw/tpm/tpm_libtpms.c         |  885 ++++++++++++++++++++++++++++++++++++++++++
 hw/tpm/tpm_nvram.c           |  340 ++++++++++++++++
 hw/tpm/tpm_nvram.h           |   25 ++
 hw/tpm/tpm_passthrough.c     |   14 -
 hw/tpm/tpm_tis.h             |    1 +
 include/sysemu/tpm_backend.h |    3 +
 qapi-schema.json             |   18 +-
 qemu-options.hx              |   31 ++-
 tpm.c                        |   28 ++-
 12 files changed, 1357 insertions(+), 19 deletions(-)
 create mode 100644 hw/tpm/tpm_libtpms.c
 create mode 100644 hw/tpm/tpm_nvram.c
 create mode 100644 hw/tpm/tpm_nvram.h