aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-11-06 19:39:07 +0100
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-12-14 23:39:14 -0500
commitebca2df783a5a742bb93784524336d8cbb9e662b (patch)
tree1d24852006ffcfecbb618118e0a3be96477a1dc8 /include
parent69c07db04625cb243db6e8a0ac0a8e3973dd961a (diff)
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.h5
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);