From nobody Mon Oct 27 18:02:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1521635200329471.90136702634743; Wed, 21 Mar 2018 05:26:40 -0700 (PDT) Received: from localhost ([::1]:54364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eycpD-0003zB-2i for importer@patchew.org; Wed, 21 Mar 2018 08:26:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eycXL-0002fm-Hu for qemu-devel@nongnu.org; Wed, 21 Mar 2018 08:08:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eycXF-0008HE-T2 for qemu-devel@nongnu.org; Wed, 21 Mar 2018 08:08:11 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41320 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 1eycXF-0008Gr-Nj for qemu-devel@nongnu.org; Wed, 21 Mar 2018 08:08:05 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2LC7oRA046663 for ; Wed, 21 Mar 2018 08:08:05 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gun4kwjsh-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 21 Mar 2018 08:08:01 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Mar 2018 08:07:55 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 21 Mar 2018 08:07:53 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2LC7rCG43253922; Wed, 21 Mar 2018 12:07:53 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BB29E2804A; Wed, 21 Mar 2018 08:07:16 -0400 (EDT) Received: from sbct-3.watson.ibm.com (unknown [9.47.158.153]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id AEF452803F; Wed, 21 Mar 2018 08:07:16 -0400 (EDT) From: Stefan Berger To: qemu-devel@nongnu.org Date: Wed, 21 Mar 2018 08:07:51 -0400 X-Mailer: git-send-email 2.5.5 In-Reply-To: <1521634071-16519-1-git-send-email-stefanb@linux.vnet.ibm.com> References: <1521634071-16519-1-git-send-email-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18032112-0056-0000-0000-00000430C648 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008715; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01006258; UDB=6.00512349; IPR=6.00785541; MB=3.00020160; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-21 12:07:54 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032112-0057-0000-0000-00000872CCB2 Message-Id: <1521634071-16519-5-git-send-email-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-21_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803210147 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-001b2d01.pphosted.com id w2LC7oRA046663 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PULL v1 4/4] tpm: CRB: query backend for TPM established flag 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: peter.maydell@linaro.org, Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau --- hw/tpm/tpm_crb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index e8c42f6..ef8b80e 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -84,6 +84,12 @@ static uint64_t tpm_crb_mmio_read(void *opaque, hwaddr a= ddr, unsigned offset =3D addr & 3; uint32_t val =3D *(uint32_t *)regs >> (8 * offset); =20 + switch (addr) { + case A_CRB_LOC_STATE: + val |=3D !tpm_backend_get_tpm_established_flag(s->tpmbe); + break; + } + trace_tpm_crb_mmio_read(addr, size, val); =20 return val; --=20 2.5.5