aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom
diff options
context:
space:
mode:
Diffstat (limited to 'stubdom')
-rw-r--r--stubdom/vtpmmgr/init.c8
-rw-r--r--stubdom/vtpmmgr/vtpmmgr.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c
index 00dd9f3516..33ac1525fc 100644
--- a/stubdom/vtpmmgr/init.c
+++ b/stubdom/vtpmmgr/init.c
@@ -436,6 +436,12 @@ egress:
return status;
}
+/* Set up the opaque field to contain a pointer to the UUID */
+static void set_opaque_to_uuid(domid_t domid, unsigned int handle)
+{
+ tpmback_set_opaque(domid, handle, tpmback_get_uuid(domid, handle));
+}
+
TPM_RESULT vtpmmgr_init(int argc, char** argv) {
TPM_RESULT status = TPM_SUCCESS;
@@ -462,7 +468,7 @@ TPM_RESULT vtpmmgr_init(int argc, char** argv) {
}
//Setup tpmback device
- init_tpmback(NULL, NULL);
+ init_tpmback(set_opaque_to_uuid, NULL);
//Setup tpm access
switch(opts.tpmdriver) {
diff --git a/stubdom/vtpmmgr/vtpmmgr.c b/stubdom/vtpmmgr/vtpmmgr.c
index 563f4e8c58..270ca8a93c 100644
--- a/stubdom/vtpmmgr/vtpmmgr.c
+++ b/stubdom/vtpmmgr/vtpmmgr.c
@@ -61,7 +61,7 @@ void main_loop(void) {
tpmcmd->resp = respbuf;
/* Process the command */
- vtpmmgr_handle_cmd(tpmcmd->uuid, tpmcmd);
+ vtpmmgr_handle_cmd(tpmcmd->opaque, tpmcmd);
/* Send response */
tpmback_resp(tpmcmd);