]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tpm: Set the flags of the CMD_INIT command to 0
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 26 Jan 2018 18:49:24 +0000 (13:49 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 21 Jun 2018 01:44:58 +0000 (20:44 -0500)
The flags of the CMD_INIT control channel command were not
initialized properly. Fix this and set to 0.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
(cherry picked from commit 302705876492a39f568035ce346e2c9176f5665e)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/tpm/tpm_emulator.c

index e1a68104d6ff5e178c9545fe6dda4fe006d3608a..ad1f74413267c83358094e8aad4649faaf3fa5bc 100644 (file)
@@ -260,7 +260,9 @@ static int tpm_emulator_check_caps(TPMEmulator *tpm_emu)
 static int tpm_emulator_startup_tpm(TPMBackend *tb)
 {
     TPMEmulator *tpm_emu = TPM_EMULATOR(tb);
-    ptm_init init;
+    ptm_init init = {
+        .u.req.init_flags = 0,
+    };
     ptm_res res;
 
     DPRINTF("%s", __func__);