From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEwqo-00031B-Mv for qemu-devel@nongnu.org; Wed, 15 Nov 2017 07:31:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEwqk-0002Av-Op for qemu-devel@nongnu.org; Wed, 15 Nov 2017 07:31:30 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59234 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEwqk-0002Ab-KO for qemu-devel@nongnu.org; Wed, 15 Nov 2017 07:31:26 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAFCSnLV009069 for ; Wed, 15 Nov 2017 07:31:21 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2e8mdpunyy-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 15 Nov 2017 07:31:20 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Nov 2017 07:31:20 -0500 From: Stefan Berger Date: Wed, 15 Nov 2017 07:31:09 -0500 In-Reply-To: <1510749069-22059-1-git-send-email-stefanb@linux.vnet.ibm.com> References: <1510749069-22059-1-git-send-email-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Message-Id: <1510749069-22059-5-git-send-email-stefanb@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 4/4] tpm_tis: Return 0 for every register in case of failure mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, marcandre.lureau@gmail.com, Stefan Berger Rather than returning ~0, return 0 for every register in case of failure mode. The '0' is better to indicate that there's no device there. It avoi= ds SeaBIOS detecting a device and getting stuck on it trying to read and wri= te its registers. Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau --- hw/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index fec2fc6..42d647d 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -545,7 +545,7 @@ static uint64_t tpm_tis_mmio_read(void *opaque, hwadd= r addr, uint8_t v; =20 if (tpm_backend_had_startup_error(s->be_driver)) { - return val; + return 0; } =20 switch (offset) { --=20 2.5.5