summaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorMarc-André Lureau2017-10-10 00:56:01 +0200
committerStefan Berger2017-10-19 17:42:32 +0200
commit698f5daa4a81984490612a6143b46f5da7392510 (patch)
treecbfc2fa751a1da2abfb8610088a5469425f24e1f /backends
parenttpm-tis: fold TPMTISEmuState in TPMState (diff)
downloadqemu-698f5daa4a81984490612a6143b46f5da7392510.tar.gz
qemu-698f5daa4a81984490612a6143b46f5da7392510.tar.xz
qemu-698f5daa4a81984490612a6143b46f5da7392510.zip
tpm: add a QOM TPM interface
This will simplify backend / interface objects relationship, so the frontend interface will simply have to implement the TPM QOM interface. 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 'backends')
-rw-r--r--backends/tpm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/tpm.c b/backends/tpm.c
index dc7c831ff8..87c5c09179 100644
--- a/backends/tpm.c
+++ b/backends/tpm.c
@@ -17,6 +17,7 @@
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/tpm.h"
+#include "hw/tpm/tpm_int.h"
#include "qemu/thread.h"
static void tpm_backend_worker_thread(gpointer data, gpointer user_data)
@@ -209,9 +210,16 @@ static const TypeInfo tpm_backend_info = {
.abstract = true,
};
+static const TypeInfo tpm_if_info = {
+ .name = TYPE_TPM_IF,
+ .parent = TYPE_INTERFACE,
+ .class_size = sizeof(TPMIfClass),
+};
+
static void register_types(void)
{
type_register_static(&tpm_backend_info);
+ type_register_static(&tpm_if_info);
}
type_init(register_types);