Skip to content

tpm: add mssim backend

James Bottomley qemu-devel 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest2 patches 4 repliesIn review
  2. v72 patches 4 repliesSuperseded
  3. v62 patches 9 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v52 patches6 repliesSuperseded
v42 patches3 repliesSuperseded
v32 patches8 repliesSuperseded
v12 patches38 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tpm: convert tpmdev options processing to new visitor formatbackends/tpm/tpm_emulator.c backends/tpm/tpm_passthrough.c include/sysemu/tpm.h +4 more+78 -1050 replies
2/2tpm: add backend for mssimMAINTAINERS backends/tpm/Kconfig backends/tpm/meson.build +5 more+451 -44 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchStefan BergerMarkus Armbruster
1/2T-b R-b
2/2A-b

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

Read the v8 thread

Cover letter [PATCH v8 0/2] tpm: add mssim backend

From: James Bottomley <[email protected]>

The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status threading). The bad news is I can't test any of the conversions. swtpm still isn't building on opensuse and, apparently, passthrough doesn't like my native TPM because it doesn't allow cancellation.

v3 pulls out more unneeded code in the visitor conversion, makes migration work on external state preservation of the simulator and adds documentation

v4 puts back the wrapper options (but doesn't add any for mssim since it post dates the necessity)

v5 rebases to the latest master branch and adjusts for removed use_FOO ptrs

v5 updates help to exit zero; does some checkpatch tidying

v7 merge review feedback and add acks.

v8 adds better error handling, more code tidies and adds command
socket disconnection/reconnection (instead of trying to keep the socket open the whole time). This adds overhead, but makes debugging guest kernel TPM issues much easier.

James

---

James Bottomley (2):
tpm: convert tpmdev options processing to new visitor format
tpm: add backend for mssim

 MAINTAINERS                    |   6 +
 backends/tpm/Kconfig           |   5 +
 backends/tpm/meson.build       |   1 +
 backends/tpm/tpm_emulator.c    |  25 ++-
 backends/tpm/tpm_mssim.c       | 319 +++++++++++++++++++++++++++++++++
 backends/tpm/tpm_mssim.h       |  44 +++++
 backends/tpm/tpm_passthrough.c |  23 +--
 docs/specs/tpm.rst             |  39 ++++
 include/sysemu/tpm.h           |   4 +-
 include/sysemu/tpm_backend.h   |   2 +-
 qapi/tpm.json                  |  49 ++++-
 softmmu/tpm-hmp-cmds.c         |   9 +
 softmmu/tpm.c                  |  91 ++++------
 softmmu/vl.c                   |  19 +-
 14 files changed, 528 insertions(+), 108 deletions(-)
 create mode 100644 backends/tpm/tpm_mssim.c
 create mode 100644 backends/tpm/tpm_mssim.h
Signature · 1 line
2.35.3