From nobody Sun Feb 8 15:46:40 2026 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 1508908778043300.9668747611257; Tue, 24 Oct 2017 22:19:38 -0700 (PDT) Received: from localhost ([::1]:46568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7E6J-0005bf-7x for importer@patchew.org; Wed, 25 Oct 2017 01:19:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7E2D-0002jX-Jc for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:15:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7E2A-0002Ct-9h for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:15:21 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7E2A-0002Bo-0d for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:15:18 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9P5Dxpc045554 for ; Wed, 25 Oct 2017 01:15:13 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dtayda643-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 25 Oct 2017 01:15:13 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Oct 2017 01:15:11 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 25 Oct 2017 01:15:10 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9P5F9KA44957724; Wed, 25 Oct 2017 05:15:09 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 25292AC043; Wed, 25 Oct 2017 01:15:54 -0400 (EDT) Received: from sbct-3.watson.ibm.com (unknown [9.47.158.153]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 0F11FAC040; Wed, 25 Oct 2017 01:15:54 -0400 (EDT) From: Stefan Berger To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 01:14:57 -0400 X-Mailer: git-send-email 2.5.5 In-Reply-To: <1508908500-25274-1-git-send-email-stefanb@linux.vnet.ibm.com> References: <1508908500-25274-1-git-send-email-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17102505-2213-0000-0000-00000230C4FA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007947; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00936096; UDB=6.00471683; IPR=6.00716363; BA=6.00005660; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017701; XFM=3.00000015; UTC=2017-10-25 05:15:11 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17102505-2214-0000-0000-000057F5879A Message-Id: <1508908500-25274-3-git-send-email-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-25_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710250073 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id v9P5Dxpc045554 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 2/5] tpm: add stubs 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, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , 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" From: Philippe Mathieu-Daud=C3=A9 Commit c37cacabf22 moved tpm_cleanup() in the main loop exit, however this function is not available when compiling with --disable-tpm. Provides necessary stubs to keep code clean of #ifdef'fery. Reported-by: BALATON Zoltan Message-Id: <20171023102903.256AF7456A0@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Richard W.M. Jones Reviewed-by: Juan Quintela Signed-off-by: Stefan Berger --- MAINTAINERS | 1 + Makefile.objs | 2 +- stubs/Makefile.objs | 1 + stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 stubs/tpm.c diff --git a/MAINTAINERS b/MAINTAINERS index 1217542..2650063 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1544,6 +1544,7 @@ TPM M: Stefan Berger S: Maintained F: tpm.c +F: stubs/tpm.c F: hw/tpm/* F: include/hw/acpi/tpm.h F: include/sysemu/tpm* diff --git a/Makefile.objs b/Makefile.objs index d4f973a..285c6f3 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -62,7 +62,7 @@ bt-host.o-cflags :=3D $(BLUEZ_CFLAGS) common-obj-y +=3D dma-helpers.o common-obj-y +=3D vl.o vl.o-cflags :=3D $(GPROF_CFLAGS) $(SDL_CFLAGS) -common-obj-y +=3D tpm.o +common-obj-$(CONFIG_TPM) +=3D tpm.o =20 common-obj-$(CONFIG_SLIRP) +=3D slirp/ =20 diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index c759479..8cfe343 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -28,6 +28,7 @@ stub-obj-y +=3D runstate-check.o stub-obj-y +=3D set-fd-handler.o stub-obj-y +=3D slirp.o stub-obj-y +=3D sysbus.o +stub-obj-y +=3D tpm.o stub-obj-y +=3D trace-control.o stub-obj-y +=3D uuid.o stub-obj-y +=3D vm-stop.o diff --git a/stubs/tpm.c b/stubs/tpm.c new file mode 100644 index 0000000..c18aac1 --- /dev/null +++ b/stubs/tpm.c @@ -0,0 +1,33 @@ +/* + * TPM stubs + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ +#include "qemu/osdep.h" +#include "sysemu/tpm.h" +#include "qmp-commands.h" + +int tpm_init(void) +{ + return 0; +} + +void tpm_cleanup(void) +{ +} + +TPMInfoList *qmp_query_tpm(Error **errp) +{ + return NULL; +} + +TpmTypeList *qmp_query_tpm_types(Error **errp) +{ + return NULL; +} + +TpmModelList *qmp_query_tpm_models(Error **errp) +{ + return NULL; +} --=20 2.5.5