diff options
| author | Marc-André Lureau | 2017-11-06 19:39:07 +0100 |
|---|---|---|
| committer | Stefan Berger | 2017-12-15 05:39:14 +0100 |
| commit | ebca2df783a5a742bb93784524336d8cbb9e662b (patch) | |
| tree | 1d24852006ffcfecbb618118e0a3be96477a1dc8 /include | |
| parent | tpm-passthrough: don't save guessed cancel_path in options (diff) | |
| download | qemu-ebca2df783a5a742bb93784524336d8cbb9e662b.tar.gz qemu-ebca2df783a5a742bb93784524336d8cbb9e662b.tar.xz qemu-ebca2df783a5a742bb93784524336d8cbb9e662b.zip | |
tpm-be: update optional function pointers
QEMU code doesn't generally have assert() for mandatory
callbacks/function pointers, probably because the crash is pretty
obvious. Document the methods instead of going into the code.
Make get_tpm_options() mandatory to implement (since all
backend implementation have it).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sysemu/tpm_backend.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h index 904e5b1026..ce8dee58cf 100644 --- a/include/sysemu/tpm_backend.h +++ b/include/sysemu/tpm_backend.h @@ -65,15 +65,18 @@ struct TPMBackendClass { TPMBackend *(*create)(QemuOpts *opts, const char *id); - /* start up the TPM on the backend */ + /* start up the TPM on the backend - optional */ int (*startup_tpm)(TPMBackend *t); + /* optional */ void (*reset)(TPMBackend *t); void (*cancel_cmd)(TPMBackend *t); + /* optional */ bool (*get_tpm_established_flag)(TPMBackend *t); + /* optional */ int (*reset_tpm_established_flag)(TPMBackend *t, uint8_t locty); TPMVersion (*get_tpm_version)(TPMBackend *t); |
