From patchwork Thu Jun 11 16:02:56 2020 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: 280754 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08502C433E0 for ; Thu, 11 Jun 2020 16:09:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C95DC206DC for ; Thu, 11 Jun 2020 16:09:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XEIaM7A/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C95DC206DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjPlH-0004aZ-WF for qemu-devel@archiver.kernel.org; Thu, 11 Jun 2020 12:09:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPfn-0005fZ-Vl for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:03:24 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42772 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjPfm-0000bm-1L for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:03:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591891400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a/GQD4lAJJ5ICleMlXPowioaefks84ty8lBKrWWjqKg=; b=XEIaM7A/pik45Sl0c/3nuYiFXSnOFI/v3PcfPjBJoaVix5hXmI5v+yaZvoePfFoieJYM7v w2mi6XbQBBMycleoN9OD9aTHauj7GL0kCxL++eMU6MhSqbY3JCJZQwAAMibFay0oGCsTKv leaxYLWwl4npNc4ct9BDiYpn5xSUR50= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-cltclGvoMqiY6FDjH6MUiQ-1; Thu, 11 Jun 2020 12:03:15 -0400 X-MC-Unique: cltclGvoMqiY6FDjH6MUiQ-1 Received: by mail-wr1-f69.google.com with SMTP id s7so2726927wrm.16 for ; Thu, 11 Jun 2020 09:03:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a/GQD4lAJJ5ICleMlXPowioaefks84ty8lBKrWWjqKg=; b=r2pj+Y+vYtiNLE9TE5kGa6iK4AONxaMAYdTBjVV+JTk7E2AwS13nYFr0cDXkDLRdQi 4PVsFZ2Q8wv3HtSK0oq9jFcD+DAVFlTZ33/vP4iADBcaahFDIzqGPPfHHAxCjZd7Y1jL oxnmqpFc1+nCuZf8i3L1X+Fa7IjgCaud8ejjtDGewhdlB0+Ba3bfgk1momLkQbTrsOHh KzMzhpth5EvzS8iDDULGJemMoxDxUo9ooIonfdd5QgTFeUIX7cnp8nncnfapxHD/tjvV D9NUWgcwIrs2rkEEVpvSf2wUGPpu8eAB6nVfQxl+k8ZZcYc9K3HngVWaEE2a4lCaPPQS oq1g== X-Gm-Message-State: AOAM5317E2TAbDmLyrHRnvHofOiNNq8CehaH8CpAMWOZZnUqOO9Y5F0b daYePHXJP7kweQzGMPRKgDbIByn0xU7tWs8n/wH8dU6gyUDErVtKEmRURDwmA8byrV6J42/bII5 SynrPQmAXPyAIhFo= X-Received: by 2002:a5d:608d:: with SMTP id w13mr10156003wrt.298.1591891394546; Thu, 11 Jun 2020 09:03:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRu5pl3GVx/86EtkVzXlDKEuxJFHnM2YWAM5CuzPHINFI1FOpnMM3w0N+qnaIKGGHjaEI+fw== X-Received: by 2002:a5d:608d:: with SMTP id w13mr10155992wrt.298.1591891394384; Thu, 11 Jun 2020 09:03:14 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id z2sm5396064wrs.87.2020.06.11.09.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 09:03:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 01/11] docs/specs/tpm: Correct header path name Date: Thu, 11 Jun 2020 18:02:56 +0200 Message-Id: <20200611160306.2751-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200611160306.2751-1-philmd@redhat.com> References: <20200611160306.2751-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 08:37:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , David Gibson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Commit 8dc6701722 introduce the documentation but an incorrect path name was used. Fix that. Signed-off-by: Philippe Mathieu-Daudé --- docs/specs/tpm.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst index 5e61238bc5..9e48e3b981 100644 --- a/docs/specs/tpm.rst +++ b/docs/specs/tpm.rst @@ -199,8 +199,8 @@ to be used with the passthrough backend or the swtpm backend. QEMU files related to TPM backends: - ``backends/tpm.c`` + - ``include/sysemu/tpm.h`` - ``include/sysemu/tpm_backend.h`` - - ``include/sysemu/tpm_backend_int.h`` The QEMU TPM passthrough device ------------------------------- From patchwork Thu Jun 11 16:02:57 2020 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: 280755 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BECDC433DF for ; Thu, 11 Jun 2020 16:06:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8C72206DC for ; Thu, 11 Jun 2020 16:06:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JK8eUPys" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8C72206DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjPj1-0000Lq-1c for qemu-devel@archiver.kernel.org; Thu, 11 Jun 2020 12:06:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPft-0005tY-2j for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:03:29 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:30130 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjPfr-0000dk-6Q for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:03:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591891406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7iBj366HDTDMnWgMVaB3F0YknnASmntgiVGR2sJtUQI=; b=JK8eUPyspY5+iMNRzHnSpiQemUgWi2wax3ld1Qphtja+9Hx1CiRvHXB5flt/zJEW+UQjGa e2L2YvrWrfOaMOFQyTIVBd0CNl51DSvnrEDMbYZmLp89WHRVzNeKyxa9BNn12mRA3mXKrY 8eC3+3tw/fb42rkSTnbuQw4qDmiq138= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-100-55Zzqu_QOFKaZEuC37xElw-1; Thu, 11 Jun 2020 12:03:22 -0400 X-MC-Unique: 55Zzqu_QOFKaZEuC37xElw-1 Received: by mail-wm1-f69.google.com with SMTP id j128so1495244wmj.6 for ; Thu, 11 Jun 2020 09:03:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7iBj366HDTDMnWgMVaB3F0YknnASmntgiVGR2sJtUQI=; b=HUUMw/pwGgyvGOp0jYiYokbhQsGBwjFAhrWiNUlg2BzkcoNrEZ+hdLOnEa4hDBcg+Q yXP/eF3AJdPCvaHQXNEmaC94YWDq4hwUfWlBkeIIkOPJO1tL76miVLiIbnw1Tt9+09hr GmFrRNu/3nT3hJsMJfZQnfUjIdBIdhG/4gqQmrnmDFG5Fy8TDN4S91xI99AJgg/ir4SA wB5UPv++67FG/QrlBW7/D2wId+ne8cCFVlEKMmeMt/m+rmNsD6uzk+/zguClErbLPZCH ZvDCH8zlValqkUiOufgASqW6rRHaZ0froK4iAOQGRudLpasFRsLFDd2C49z0xoqlPsY/ axHQ== X-Gm-Message-State: AOAM531NVFjH0T0rkugfi+y5/IncILhN55EIUbTRTH7xqS8Ofo+BOn1R e9oYNc6j+aJSs3TcAIkdHLmgHOCKMRUlf8tHTcF2PqxB3/Mp6X/DnVd78pwit6b3fe4u5dgAVHA RJ5nBLF6lMYEplyQ= X-Received: by 2002:a1c:4b0f:: with SMTP id y15mr9363313wma.83.1591891401289; Thu, 11 Jun 2020 09:03:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysYVRwNxY8KI8rLxmGY2TQHT1+N0syLuE0dhRmn5YmtrYNyAItSL3gGuMfFqmDn8cWQJIKDA== X-Received: by 2002:a1c:4b0f:: with SMTP id y15mr9363172wma.83.1591891399406; Thu, 11 Jun 2020 09:03:19 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id z2sm5396336wrs.87.2020.06.11.09.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 09:03:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 02/11] backends: Add TPM files into their own directory Date: Thu, 11 Jun 2020 18:02:57 +0200 Message-Id: <20200611160306.2751-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200611160306.2751-1-philmd@redhat.com> References: <20200611160306.2751-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , David Gibson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" As we will have various TPM backend files, it is cleaner to use a single directory. Suggested-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daudé --- backends/{tpm.c => tpm/tpm_backend.c} | 0 MAINTAINERS | 2 +- backends/Makefile.objs | 2 +- backends/tpm/Makefile.objs | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) rename backends/{tpm.c => tpm/tpm_backend.c} (100%) create mode 100644 backends/tpm/Makefile.objs diff --git a/backends/tpm.c b/backends/tpm/tpm_backend.c similarity index 100% rename from backends/tpm.c rename to backends/tpm/tpm_backend.c diff --git a/MAINTAINERS b/MAINTAINERS index 3abe3faa4e..9deb15b268 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2385,7 +2385,7 @@ F: hw/tpm/* F: include/hw/acpi/tpm.h F: include/sysemu/tpm* F: qapi/tpm.json -F: backends/tpm.c +F: backends/tpm/ F: tests/qtest/*tpm* T: git https://github.com/stefanberger/qemu-tpm.git tpm-next diff --git a/backends/Makefile.objs b/backends/Makefile.objs index 28a847cd57..22d204cb48 100644 --- a/backends/Makefile.objs +++ b/backends/Makefile.objs @@ -1,7 +1,7 @@ common-obj-y += rng.o rng-egd.o rng-builtin.o common-obj-$(CONFIG_POSIX) += rng-random.o -common-obj-$(CONFIG_TPM) += tpm.o +common-obj-$(CONFIG_TPM) += tpm/ common-obj-y += hostmem.o hostmem-ram.o common-obj-$(CONFIG_POSIX) += hostmem-file.o diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs new file mode 100644 index 0000000000..8cf5772824 --- /dev/null +++ b/backends/tpm/Makefile.objs @@ -0,0 +1 @@ +common-obj-y += tpm_backend.o From patchwork Thu Jun 11 16:03:03 2020 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: 280752 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E35CC433E0 for ; Thu, 11 Jun 2020 16:11:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E41A206DC for ; Thu, 11 Jun 2020 16:11:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bi3MJvwF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E41A206DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjPnh-0000Vr-SP for qemu-devel@archiver.kernel.org; Thu, 11 Jun 2020 12:11:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPgV-0006iz-Sh for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:04:07 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:47966 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjPgU-0000wP-5I for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:04:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591891445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xQSuJDxId+eIi5LOLR+uHKFmqgbML9RlTNVSEbvu1dk=; b=bi3MJvwF2Yz35nJIFDDLlMsCY348HHiflPLc/zJ7HlbNVZI42Hrosp6z5qsqSoSchDvdzg lxkJIs+ltgfG81EBYUN1yY36D/HzfGnXTcoZRENtYpgyCux5gaMv4blpQo6Kgp8hCDK1zp D6iPHkrV0Dq5UBG5HmJKYJhzCLe6W/o= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-6zSOUtSEOyqosN2OTi2xtA-1; Thu, 11 Jun 2020 12:03:52 -0400 X-MC-Unique: 6zSOUtSEOyqosN2OTi2xtA-1 Received: by mail-wm1-f71.google.com with SMTP id 11so1225778wmj.6 for ; Thu, 11 Jun 2020 09:03:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xQSuJDxId+eIi5LOLR+uHKFmqgbML9RlTNVSEbvu1dk=; b=rXNTcWZNGIFLHZ3KoSCEQNweG2hQFJx69G4EApBKEh/9hN/Y+HUw0rDPjHhLp/9+yu pnOzAt23CJ+ZEkWOkFIPifEbF7Bk5SlLf3squ1k/9H+ltitzYEe1WKwBNx8rjDUv7ewk qbDc14ZOMj7RQRlAFCPB2xb8su7uZrmabOx+q2uLGtvrr/YuwRbkHh5Zn32gBECEQXm7 nSDll0opWoAIyarnjsVNnBNTy6yxliiFlJOXsgKgBN8BVfD8TStSEieJ7Myn6XZv/zB0 do6/1pkHWZcc1NI6fmNP8tBjOaaweTWTRYVzbTcJjlTMGE2JljQYCs6svtQOwUaOGcts JYrg== X-Gm-Message-State: AOAM530rqVo65VVkoT1mH2XuWZpuAEajKp+9gd/D6pcYaC+7bi9Y59/h PugSdw/bjo1H0Q0BYFRTTuyp3bXtjVhhfWRQ93mFcZQHMi3+rAwDfbIUc8IKk2yBMUPKf1Y48kT q0KZ9mitTDl2jg3Q= X-Received: by 2002:a5d:4446:: with SMTP id x6mr9906069wrr.119.1591891430739; Thu, 11 Jun 2020 09:03:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvPnc0zlH5xdZMbH/e4XltSwwnYw3bBzPbd6sDfqW8DUaJqaLs0pcq5i1BBOIcCVx8eEOXvw== X-Received: by 2002:a5d:4446:: with SMTP id x6mr9906047wrr.119.1591891430578; Thu, 11 Jun 2020 09:03:50 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id k21sm5913606wrd.24.2020.06.11.09.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 09:03:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 08/11] hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h' Date: Thu, 11 Jun 2020 18:03:03 +0200 Message-Id: <20200611160306.2751-9-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200611160306.2751-1-philmd@redhat.com> References: <20200611160306.2751-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , David Gibson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We are going to make "tpm_util.h" publicly accessible by moving it to the include/ directory in a pair of commits. Keep declarations internals to hw/tpm/ in "tpm_int.h". Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_int.h | 11 +++++++++++ hw/tpm/tpm_util.h | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h index fd5ebc6489..9f72879d89 100644 --- a/hw/tpm/tpm_int.h +++ b/hw/tpm/tpm_int.h @@ -13,6 +13,7 @@ #define TPM_TPM_INT_H #include "qemu/option.h" +#include "sysemu/tpm.h" #define TPM_STANDARD_CMDLINE_OPTS \ { \ @@ -74,4 +75,14 @@ struct tpm_resp_hdr { #define TPM_RC_FAILURE 0x101 #define TPM_RC_LOCALITY 0x907 +int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version, + size_t *buffersize); + +typedef struct TPMSizedBuffer { + uint32_t size; + uint8_t *buffer; +} TPMSizedBuffer; + +void tpm_sized_buffer_reset(TPMSizedBuffer *tsb); + #endif /* TPM_TPM_INT_H */ diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h index 7889081fba..d524935576 100644 --- a/hw/tpm/tpm_util.h +++ b/hw/tpm/tpm_util.h @@ -66,19 +66,9 @@ static inline void tpm_cmd_set_error(void *b, uint32_t error) stl_be_p(b + 6, error); } -int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version, - size_t *buffersize); - #define DEFINE_PROP_TPMBE(_n, _s, _f) \ DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *) -typedef struct TPMSizedBuffer { - uint32_t size; - uint8_t *buffer; -} TPMSizedBuffer; - -void tpm_sized_buffer_reset(TPMSizedBuffer *tsb); - void tpm_util_show_buffer(const unsigned char *buffer, size_t buffer_size, const char *string);