提交 67af320c 编写于 作者: M Marc-André Lureau 提交者: Stefan Berger

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: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
上级 8a37fc44
......@@ -17,7 +17,6 @@
#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)
......
......@@ -13,28 +13,8 @@
#define TPM_TPM_INT_H
#include "qemu/osdep.h"
#include "qom/object.h"
#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;
#define TPM_STANDARD_CMDLINE_OPTS \
#define TPM_STANDARD_CMDLINE_OPTS \
{ \
.name = "type", \
.type = QEMU_OPT_STRING, \
......
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册