Received: from eggs.gnu.org ([2001:4830:134:3::10]:53682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eP5cm-0008Ha-I4 for qemu-devel@nongnu.org; Wed, 13 Dec 2017 06:54:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eP5ch-0005WZ-Mn for qemu-devel@nongnu.org; Wed, 13 Dec 2017 06:54:56 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eP5ch-0005W0-EY for qemu-devel@nongnu.org; Wed, 13 Dec 2017 06:54:51 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vBDBnJRI105924 for ; Wed, 13 Dec 2017 06:54:47 -0500 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2eu3m30bgx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 13 Dec 2017 06:54:47 -0500 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 13 Dec 2017 04:54:46 -0700 References: <1510371554-29833-1-git-send-email-stefanb@linux.vnet.ibm.com> <1510371554-29833-2-git-send-email-stefanb@linux.vnet.ibm.com> From: Stefan Berger Date: Wed, 13 Dec 2017 06:54:41 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] tpm_tis: Return TPM_VERSION_UNSPEC in case of BE failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= Cc: Amarnath Valluri , QEMU On 12/13/2017 05:23 AM, Marc-Andr=C3=A9 Lureau wrote: > On Sat, Nov 11, 2017 at 4:39 AM, Stefan Berger > wrote: >> In case the backend has a failure, such as the tpm_emulator's CMD_INIT >> failing, the TIS goes into failure mode and does not respond to reads >> or writes to MMIO registers. In this case we need to prevent the ACPI >> table from being added and the straight-forward way is to indicate tha= t >> there's no known TPM version being used. >> >> Signed-off-by: Stefan Berger > Reviewed-by: Marc-Andr=C3=A9 Lureau Resending an old response? https://patchwork.kernel.org/patch/10058405/ > > >> --- >> hw/tpm/tpm_tis.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c >> index c0a0204..eca3374 100644 >> --- a/hw/tpm/tpm_tis.c >> +++ b/hw/tpm/tpm_tis.c >> @@ -970,6 +970,10 @@ static enum TPMVersion tpm_tis_get_tpm_version(TP= MIf *ti) >> { >> TPMState *s =3D TPM(ti); >> >> + if (tpm_backend_had_startup_error(s->be_driver)) { >> + return TPM_VERSION_UNSPEC; >> + } >> + >> return tpm_backend_get_tpm_version(s->be_driver); >> } >> >> -- >> 2.5.5 >> >> > >