From patchwork Mon Oct 23 21:33:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 829644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cbalahLY"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yLV7R200mz9sPr for ; Tue, 24 Oct 2017 08:35:31 +1100 (AEDT) Received: from localhost ([::1]:40671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6kNd-0000BL-C9 for incoming@patchwork.ozlabs.org; Mon, 23 Oct 2017 17:35:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6kMj-0008T1-D7 for qemu-devel@nongnu.org; Mon, 23 Oct 2017 17:34:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6kMi-0000CS-AF for qemu-devel@nongnu.org; Mon, 23 Oct 2017 17:34:33 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:48779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6kMi-0000CK-5Y; Mon, 23 Oct 2017 17:34:32 -0400 Received: by mail-qt0-x241.google.com with SMTP id f8so28047154qta.5; Mon, 23 Oct 2017 14:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4qmuRjttY0F6mS/4IQEKKo3NhWyfY7E6Gt+msSMN9Ow=; b=cbalahLYj3A98nCq2kbGFU2/l5OJQUMvkrztA8VgavZUz6azmm2eBNBI+I0SaVi/Jg kflFj4UVmu4PlAXMyHRU6+APHYrBSg2/nJQes8+jvzevJJGjHaKrBjmf78i6tAUXRwYy bEj75yDukQSPFpAoTrVUveb3ObOFSkNCiCgpPjOVj9942MFKF5Wg4QPNSU8mYY3K+5FQ Ex5m0UorDlJV9c6LhvQQ0WwHrUBlWIWbP/ynoto4Peg2DamH2yisZ6lwiqnALM607Wfq 97bOS3a0b6lgbnKKce82gCICzsewyg7X4zQStF40YlbZ9FDan4x5CWWoJElZhXBFBU0V R3dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4qmuRjttY0F6mS/4IQEKKo3NhWyfY7E6Gt+msSMN9Ow=; b=tkyksIVZLQrq8uBPV/6Pc5JAqr3R10MatW915KIhuOhYeQYU0ex5BFn0frkBnNccAp aXvTOWD9tZ8wWPdeGhW9uzf7mu4OgC7/SoRpY2OZ3nNhcEq6quvbU3RdLB7KKLlpLsVk L5Ib/bBxyG1wimquuYfkHbaP1FOfuSCzhOj/yZA/qw/wvyEf5ZGxNagqE0C0zU/WVTBp zVQWmryLRUT+IQgl8MeqUb+NNiT3KVBJ+Uhy4GFfXG6EzZLfQDvhWJqCNyYwuao5zDqM fcXVyDPDTTuI3mpkF4Ou3rJjjjfPvoutBexDtq2+UDGQo4MG8zvLGbRxsYgrATNuFZyC yd8w== X-Gm-Message-State: AMCzsaUw9UUmkgvkwZopN/w7OFAlsX1VwlpdSJUcze2AmsZk0vxOVyBG cfZFX7YqIamsHci02XRgZh9THEUe X-Google-Smtp-Source: ABhQp+TQvaR5hsn2Sd/nZSS4jOxSFSEi/UZup/6+cyhSuZs5uBbrt+bdR/WyC9dSZ0O0KZqEvewP3Q== X-Received: by 10.237.53.92 with SMTP id b28mr23077527qte.280.1508794471617; Mon, 23 Oct 2017 14:34:31 -0700 (PDT) Received: from x1.local ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id s51sm5568381qtk.32.2017.10.23.14.34.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 14:34:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: BALATON Zoltan , "Richard W . M . Jones" , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Stefan Berger , Peter Maydell Date: Mon, 23 Oct 2017 18:33:58 -0300 Message-Id: <20171023213359.23025-3-f4bug@amsat.org> X-Mailer: git-send-email 2.15.0.rc1 In-Reply-To: <20171023213359.23025-1-f4bug@amsat.org> References: <20171023213359.23025-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::241 Subject: [Qemu-devel] [PATCH 2/3] 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: qemu-trivial@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" this fixes compile with --disable-tpm Reported-by: BALATON Zoltan Message-Id: <20171023102903.256AF7456A0@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- Makefile.objs | 2 +- stubs/tpm.c | 33 +++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + stubs/Makefile.objs | 1 + 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 stubs/tpm.c diff --git a/Makefile.objs b/Makefile.objs index d4f973a8fc..285c6f3c15 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -62,7 +62,7 @@ bt-host.o-cflags := $(BLUEZ_CFLAGS) common-obj-y += dma-helpers.o common-obj-y += vl.o vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) -common-obj-y += tpm.o +common-obj-$(CONFIG_TPM) += tpm.o common-obj-$(CONFIG_SLIRP) += slirp/ diff --git a/stubs/tpm.c b/stubs/tpm.c new file mode 100644 index 0000000000..6b90557e42 --- /dev/null +++ b/stubs/tpm.c @@ -0,0 +1,33 @@ +/* + * TPM configuration + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * 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; +} diff --git a/MAINTAINERS b/MAINTAINERS index 12175425a7..2650063242 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/stubs/Makefile.objs b/stubs/Makefile.objs index c7594796c3..8cfe34328a 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -28,6 +28,7 @@ stub-obj-y += runstate-check.o stub-obj-y += set-fd-handler.o stub-obj-y += slirp.o stub-obj-y += sysbus.o +stub-obj-y += tpm.o stub-obj-y += trace-control.o stub-obj-y += uuid.o stub-obj-y += vm-stop.o