From nobody Sat May 4 03:54:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550237058135781.2678818580611; Fri, 15 Feb 2019 05:24:18 -0800 (PST) Received: from localhost ([127.0.0.1]:39807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gudTR-0000Rh-Nb for importer@patchew.org; Fri, 15 Feb 2019 08:24:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gudSY-00007c-HM for qemu-devel@nongnu.org; Fri, 15 Feb 2019 08:23:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gudSW-0001gL-GD for qemu-devel@nongnu.org; Fri, 15 Feb 2019 08:23:18 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:42822) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gudSU-0001NQ-Pl for qemu-devel@nongnu.org; Fri, 15 Feb 2019 08:23:16 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1FDIrEP081456; Fri, 15 Feb 2019 13:23:09 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2qhre5wskx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Feb 2019 13:23:09 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1FDN8ND006365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Feb 2019 13:23:08 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1FDN7AP012729; Fri, 15 Feb 2019 13:23:07 GMT Received: from ol7.uk.oracle.com (/10.175.220.50) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 15 Feb 2019 05:23:06 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=xh1d7aR2csnY40wgoLdRlsSICwSfacYY8Z1fH4Nj3mY=; b=zd53Q1i2COUI7nFeAWKHBYHHEc4vQ1u7m8NFWa/t8N2mUd3BxYZTfMBKRJyn9zovMTQ+ HsDhOnT6n1ekke1p2eLakbwmet1okUkRAxTrJmMCUDhAoQr05mSgNB2brk40PZLLaxel mQ1Zt+LZi06WHg9Lwv0zwVG/5q0IvCYw6qyUNla9FcPfLD1u0UY2+SLrY5/lBQY1/xpt 0tyRaEQYIuArBfVpFz4+bV7Xn6nNeZFbYldNpXPHF7VEfRNxlnUmdRapU0vcW8bJBrXb S+kiF10L62hd4owi05Ohgl3LSiuKB9I2gGYT2hHKqlax9ed1oVrdXPx4ogCdFdSVkX2S qw== From: Liam Merwick To: stefanb@linux.ibm.com, qemu-devel@nongnu.org Date: Fri, 15 Feb 2019 13:22:57 +0000 Message-Id: <1550236979-15658-1-git-send-email-liam.merwick@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9167 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=818 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902150095 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 Subject: [Qemu-devel] rom c17b1cc4b07370e504cc0ca4ce4af560a83d5977 Mon Sep 17 00:00:00 2001 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: philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In tpm_tis_mmio_write() if the requesting locality is seizing access, any seizure by a lower locality is cancelled. However the loop doing the seizure had an off-by-one error and the locality immediately preceding the requesting locality was not being cleared. This is fixed by adjusting the test in the for loop to check the localities up to the requesting locality. Signed-off-by: Liam Merwick Reviewed-by: Stefan Berger --- 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 fd6bb9b59a96..61a130beef35 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -624,7 +624,7 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr add= r, } =20 /* cancel any seize by a lower locality */ - for (l =3D 0; l < locty - 1; l++) { + for (l =3D 0; l < locty; l++) { s->loc[l].access &=3D ~TPM_TIS_ACCESS_SEIZE; } =20 --=20 1.8.3.1