summaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-11-06 19:38:59 +0100
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-12-14 23:39:13 -0500
commit67af320cd653a107c0bbdf0d2e6c51b24403c64d (patch)
tree826c1b1d54289efce43fa5d9b899a4b88f3027f8 /include/sysemu
parent8a37fc44c6618ca0ede761809d0ecaf605f832fc (diff)
downloadqemu-67af320cd653a107c0bbdf0d2e6c51b24403c64d.tar.gz
tpm: move TpmIf in include/sysemu/tpm.h
This is a better location than hw/tpm, since we are going to use the interface from outside hw/tpm. 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/sysemu')
-rw-r--r--include/sysemu/tpm.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index d7a2bd8556..452cdb9cb7 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -27,6 +27,25 @@ typedef enum TPMVersion {
TPM_VERSION_2_0 = 2,
} TPMVersion;
+#define TYPE_TPM_IF "tpm-if"
+#define TPM_IF_CLASS(klass) \
+ OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF)
+#define TPM_IF_GET_CLASS(obj) \
+ OBJECT_GET_CLASS(TPMIfClass, (obj), TYPE_TPM_IF)
+#define TPM_IF(obj) \
+ INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
+
+typedef struct TPMIf {
+ Object parent_obj;
+} TPMIf;
+
+typedef struct TPMIfClass {
+ InterfaceClass parent_class;
+
+ /* run in thread pool by backend */
+ void (*request_completed)(TPMIf *obj);
+} TPMIfClass;
+
TPMVersion tpm_tis_get_tpm_version(Object *obj);
#define TYPE_TPM_TIS "tpm-tis"