From patchwork Tue Jun 19 01:41:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 10472889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 49C2360244 for ; Tue, 19 Jun 2018 02:21:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D6B328C1E for ; Tue, 19 Jun 2018 02:21:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 318C728D6D; Tue, 19 Jun 2018 02:21:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D83B828C1E for ; Tue, 19 Jun 2018 02:21:49 +0000 (UTC) Received: from localhost ([::1]:38585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV6HF-0004Kz-12 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 18 Jun 2018 22:21:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5hQ-00010T-T2 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:44:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5hN-00083Y-QT for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:44:48 -0400 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:41482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5hN-00083I-LL; Mon, 18 Jun 2018 21:44:45 -0400 Received: by mail-oi0-x236.google.com with SMTP id a141-v6so16692611oii.8; Mon, 18 Jun 2018 18:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CHM5MiieMPSGRZw1pWLqUbNK3KsCZvWYKRaYx7xVE0o=; b=Hwdaj1e8BnrMapNNhZSKJ4XgdBS0+Lmivx3Y3DMHf1YgxqIoY8h5k58R60KQw/+3n2 p6tDta0Jzzq/feK7CsOIw258gycS+H40ZUn3jJegP0CPyCZv0Jq7OakU3QVICcjAPIo6 sNH+MWQlgnZup+A/mggl+lWphpseTEPT8bwXFLZoFFeZ7BB/B9j+MUPyaob9US4HSOh1 rutfLHM5XgSuhGO4AR9+qZnBQA9QYY0F5OURE4OgJc8VE6H2t4ZbqJrZzP8bRUEDdMwP SvtRqH6DbReX4iz576n6i03yQ8IoSHBwy+5pYQ5KRXpYIdovy+tytbjUzVA7Aj/yPQ/r YR0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=CHM5MiieMPSGRZw1pWLqUbNK3KsCZvWYKRaYx7xVE0o=; b=QWTJ+fXgUUWlEU2osBwpCVh/cgdmySE82Vh1hK0dN74bgeaBPiaZKD/ob8WrAh73P2 hfLLTbRh9JeI4wWboIOeyhDVq4lgzQ49oSqTH5lC87v2WgwNW8R/EpwHGA1RLVUKdnDs lTGWyFKcGmCSeUjYo+/bTfeTXB72VwbMwEXTLSbeHcEl5/7uLC9NQ9lGnFh2FfLcB54g aF78z1QvBPghB5cHJ62hRWvOt+Hgte5LD2o8MFqQenKQ9LJaz3D/VoX5t0d7kFumI5eg 4S6KVIkvQsgKxMfjVXUCUNnJnuQVRDc+1dUcwfMgnaTQrPrc9Nqd/EoSfr1Z1e8faOQ3 o5QQ== X-Gm-Message-State: APt69E3XgdXVS4SNFybLyl5QHiUiHoGRbvAFixLNLMAk0+pFbgtGQLo+ bXOGPmoKRH+Q7w13D7jlx9xwFnwC X-Google-Smtp-Source: ADUXVKJyEALk+r7w6C7gztowl5vLYdOArA7EciTAGqPo1JxrXWZsnHxVRNtGoAS/co8LZA/XK/CK7A== X-Received: by 2002:aca:3409:: with SMTP id b9-v6mr7629562oia.10.1529372684536; Mon, 18 Jun 2018 18:44:44 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id k141-v6sm12951793oih.42.2018.06.18.18.44.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:44:43 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:41:46 -0500 Message-Id: <20180619014319.28272-21-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::236 Subject: [Qemu-devel] [PATCH 020/113] tpm: Set the flags of the CMD_INIT command to 0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-stable@nongnu.org, Stefan Berger Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Stefan Berger The flags of the CMD_INIT control channel command were not initialized properly. Fix this and set to 0. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau (cherry picked from commit 302705876492a39f568035ce346e2c9176f5665e) Signed-off-by: Michael Roth --- hw/tpm/tpm_emulator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index e1a68104d6..ad1f744132 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/tpm_emulator.c @@ -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__);