/* Start the TPM (thread). If it had been started before, then terminate and start it again.  */
static int tpm_passthrough_startup_tpm(TPMBackend *tb)
/* Start the TPM (thread). If it had been started before, then terminate and start it again.  */
static int tpm_passthrough_startup_tpm(TPMBackend *tb)
{
    TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
    tpm_backend_thread_end(&tpm_pt->tbt);
    tpm_backend_thread_create(&tpm_pt->tbt,
                              tpm_passthrough_worker_thread,
                              &tpm_pt->tpm_thread_params);
    return 0;
}