From: James Bottomley <james.bottom...@hansenpartnership.com> 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 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 | 24 +-- backends/tpm/tpm_mssim.c | 290 +++++++++++++++++++++++++++++++++ backends/tpm/tpm_mssim.h | 44 +++++ backends/tpm/tpm_passthrough.c | 22 +-- docs/specs/tpm.rst | 35 ++++ include/sysemu/tpm.h | 4 +- include/sysemu/tpm_backend.h | 2 +- monitor/hmp-cmds.c | 9 + qapi/tpm.json | 45 ++++- softmmu/tpm.c | 90 ++++------ softmmu/vl.c | 19 +-- 14 files changed, 488 insertions(+), 108 deletions(-) create mode 100644 backends/tpm/tpm_mssim.c create mode 100644 backends/tpm/tpm_mssim.h -- 2.35.3