aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/tpm_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysemu/tpm_backend.h')
-rw-r--r--include/sysemu/tpm_backend.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 0d6c994a62..7e166ef954 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -18,6 +18,7 @@
#include "qapi-types.h"
#include "qemu/option.h"
#include "sysemu/tpm.h"
+#include "qapi/error.h"
#define TYPE_TPM_BACKEND "tpm-backend"
#define TPM_BACKEND(obj) \
@@ -45,9 +46,8 @@ struct TPMBackend {
/*< protected >*/
TPMIf *tpmif;
bool opened;
- GThreadPool *thread_pool;
bool had_startup_error;
- QEMUBH *bh;
+ TPMBackendCmd *cmd;
/* <public> */
char *id;
@@ -85,7 +85,7 @@ struct TPMBackendClass {
TpmTypeOptions *(*get_tpm_options)(TPMBackend *t);
- void (*handle_request)(TPMBackend *s, TPMBackendCmd *cmd);
+ void (*handle_request)(TPMBackend *s, TPMBackendCmd *cmd, Error **errp);
};
/**
@@ -197,6 +197,15 @@ TPMVersion tpm_backend_get_tpm_version(TPMBackend *s);
size_t tpm_backend_get_buffer_size(TPMBackend *s);
/**
+ * tpm_backend_finish_sync:
+ * @s: the backend to call into
+ *
+ * Finish the pending command synchronously (this will call aio_poll()
+ * on qemu main AIOContext until it ends)
+ */
+void tpm_backend_finish_sync(TPMBackend *s);
+
+/**
* tpm_backend_query_tpm:
* @s: the backend
*