From patchwork Fri Jun 12 08:54:33 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: 280644 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 99DD4C433E0 for ; Fri, 12 Jun 2020 08:56:04 +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 61A32206D7 for ; Fri, 12 Jun 2020 08:56: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="XLDpqQAC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61A32206D7 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]:35050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfTn-0006bh-Kg for qemu-devel@archiver.kernel.org; Fri, 12 Jun 2020 04:56:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfSn-0005AU-Mp for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:25883 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 1jjfSl-0006xL-HG for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952097; 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=5GHBSuF7Q+CJBw+7dBn2iaHmKbWBMMH0+Nvg3ibl58s=; b=XLDpqQACgyWj3bRZ/pb60cCqOSzBh4gOH9ObohtK+iaIRdE/gBUPaQCItnRDO1GfrHZLTF WSKp5caPa5H8BYSvbaBXbZw9j+ylFvd90L9VeacfGebejFK9offHpRhhknBCd6SPRmIuWC V05uZMzx47Q3fX5+2T6zHMZOdxQDiqA= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-KMTnKCFdNBG-YQmWoPjcKQ-1; Fri, 12 Jun 2020 04:54:55 -0400 X-MC-Unique: KMTnKCFdNBG-YQmWoPjcKQ-1 Received: by mail-wr1-f71.google.com with SMTP id l1so3642490wrc.8 for ; Fri, 12 Jun 2020 01:54:54 -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=5GHBSuF7Q+CJBw+7dBn2iaHmKbWBMMH0+Nvg3ibl58s=; b=sPBHTzd4t+7N0EOty46vHtxj2RcIow42n1UQOYJKyVk4FJtlpBPxaTySXpqIL1Xsa8 jLw7QBewFaeIb+orV8zNdy/aRDzSy72Ydn+n4+x+Amdt69QuR4+JoRWQmS2H2Z0KIdov XX2HjGhAvXP0TjktqYXX5IPBMzseaINdobZYzRzSFjcM7SHhINOEAYOBA4rwzI4yUQS0 h27DXlFD1eDdSdq0I2hYSdkAUXtbbRFZeO+pwxm6gDDsg0wQZcnOmmxp+7t+Bw/GK+t/ L04+WqfoICxVnuCdoYKZfSFOB7Az85bVb8f+GFaY0+6KnIWNje0aCfm+O+Pp6lzZ7V19 y75w== X-Gm-Message-State: AOAM530joDbM9IqI3L2gugoqn8uaP9ESeocg6gGcL1xZj1yZ6su1r+C+ Q8h83QBnE/p0ympU7BQxF7nauOcp11MbDywxF0jI05cl/xq0gfIHpmM85gU7VJslsecbGcNDSr2 NmZ8Yz/Hxao6Gf9c= X-Received: by 2002:a1c:f301:: with SMTP id q1mr12301048wmq.110.1591952093726; Fri, 12 Jun 2020 01:54:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqhDCdRl68UmaQpiMZNriLEsGk3nedDOWqe1PJXCPTSPMtCieXNzuYPRry+6IWQ1jp5a4rxA== X-Received: by 2002:a1c:f301:: with SMTP id q1mr12301031wmq.110.1591952093518; Fri, 12 Jun 2020 01:54:53 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id c70sm7470421wme.32.2020.06.12.01.54.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:54:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 01/12] docs/specs/tpm: Correct header path name Date: Fri, 12 Jun 2020 10:54:33 +0200 Message-Id: <20200612085444.8362-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200612085444.8362-1-philmd@redhat.com> References: <20200612085444.8362-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.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/12 04:54:57 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 , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , David Gibson 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. Reviewed-by: Stefan Berger 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 Fri Jun 12 08:54:34 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: 280643 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 02241C433DF for ; Fri, 12 Jun 2020 08:56:12 +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 C398520801 for ; Fri, 12 Jun 2020 08:56:11 +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="Dpu2OZTv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C398520801 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]:35828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfTv-0006yF-05 for qemu-devel@archiver.kernel.org; Fri, 12 Jun 2020 04:56:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfSs-0005FK-W3 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:07 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:52600 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 1jjfSr-0006xw-C8 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952104; 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=9HZwOVjviVKxzbK+VbediPY+NgHJde8KRqV1RN+ZuZw=; b=Dpu2OZTvLfsApo1gjQkwQRBcvH368HU6X8hgQ7rHFlv9hWdgW4FZYenblAjUNMGJnQz2f1 cIhlaJD5r9rGfPfTQtq43dOlcSrSVN4yCqsTjNTyPqNOJpuzTYDjtL/rShM3wFa/r+s3s6 a+RI12xKTk5Y97Tm08TWYB44w1hsZHM= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-481-XJSfQGbANOyx9HpZ48J8RQ-1; Fri, 12 Jun 2020 04:55:00 -0400 X-MC-Unique: XJSfQGbANOyx9HpZ48J8RQ-1 Received: by mail-wr1-f72.google.com with SMTP id z10so3672975wrs.2 for ; Fri, 12 Jun 2020 01:55:00 -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=9HZwOVjviVKxzbK+VbediPY+NgHJde8KRqV1RN+ZuZw=; b=tpnSxeD04wEl6rc/8fbSQ33k2MNBHlAGpQYCOVZpF+EgC+NPcC7ppvKsN3aR/Ji7VX WlPM36v8TiBOWXUiMMPPxDvZEKl7EyH6l1adDlayj1M6ya63SAEA8mvO9jpnjPeDPrEu UPEjzl9qz5OQf3OSqHgzOmXH0bjBlenyVKPQ4Lrj5IHOZmvNw0H0j73pBst2eA/DGCxC 9tQZtICOUDwuaxWO9xoragdaTPrUqSrRqEx3A+aT2P7QutAHV8Jffcb3FS36yVbK8vWY 9T5o0dSKg8n64G/TbdYQ2LwjoYoMkZPf5IM25XrGUCUc/NkikSB2VQ92UzMrQ62Kfk2+ +YWw== X-Gm-Message-State: AOAM530kBzPm8yG4hkiOEOKxVKMWbxWLAiGug2OTu0w2G/ICNj+3mgi/ rN8XayvWEXHIj7aVwgzGGlnW1aMKes4jKP9G4XAO+mp7GG/A5IemKXZVWw7PrT0Z7Npq60puGJr +9Z8Zbx8lwLWvXf8= X-Received: by 2002:adf:ea11:: with SMTP id q17mr13541994wrm.75.1591952098921; Fri, 12 Jun 2020 01:54:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzypUxkHZiHxvLSd0Z0xmZvOr972OBgBBoBhRTFdhRv7hwjhCCqy5/zIFhAd9NZ15WgI+eSpw== X-Received: by 2002:adf:ea11:: with SMTP id q17mr13541979wrm.75.1591952098726; Fri, 12 Jun 2020 01:54:58 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id c65sm8393188wme.8.2020.06.12.01.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:54:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 02/12] backends: Add TPM files into their own directory Date: Fri, 12 Jun 2020 10:54:34 +0200 Message-Id: <20200612085444.8362-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200612085444.8362-1-philmd@redhat.com> References: <20200612085444.8362-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/12 04:55:01 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 , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , David Gibson 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 Reviewed-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 Fri Jun 12 08:54:37 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: 280642 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 AB07FC433E0 for ; Fri, 12 Jun 2020 08:58:04 +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 7306C206D7 for ; Fri, 12 Jun 2020 08:58: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="g1IpwiPX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7306C206D7 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]:44074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfVj-0002pG-Ng for qemu-devel@archiver.kernel.org; Fri, 12 Jun 2020 04:58:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfT7-0005ZS-Ex for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:21 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:59864 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 1jjfT5-0006z6-Cj for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952118; 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=GhYz6sKF2bPYiUHoKS1Jnt6TjZbsEwWbEop5lmusuaY=; b=g1IpwiPXFF8hb4Vu2zJHUFApjKYhm5Tm4R6P1VPeo8PcLuzA4kV3hYZt+MCaO4SV/6C5q5 o1wcYIvr7Fi/lAKwn/qruf+sF9xig4YYxudIPmod6wmyx+xjN3czklpeFY57irgt7YnD/9 MXh3SeuMqjHxNSbtLSSsniHs069l6Kw= 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-447-0R3-TkmqOf-zmOvWSxEcjg-1; Fri, 12 Jun 2020 04:55:16 -0400 X-MC-Unique: 0R3-TkmqOf-zmOvWSxEcjg-1 Received: by mail-wm1-f71.google.com with SMTP id h25so3585359wmb.0 for ; Fri, 12 Jun 2020 01:55:16 -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=GhYz6sKF2bPYiUHoKS1Jnt6TjZbsEwWbEop5lmusuaY=; b=MXdQzj2C1f7LhL5TTzN5V2vF4HSESq5DsOqNyFRJMh3KsSo1HYRTUMepZP+AIIQXo+ Sji1dRYf5izGe9MU196eVo3jr5bjV8gp50xvNMPHtT5rLt6XkvAIhePo0MAMao9szMrI KHid4zNUcBZCXEFZG66eOt90t1xPhwa3maan7j9JaESL+wL6TrxrfWsVJSkycyDmG1fa aZoDJUOTsoZTzfPXCk5TEarz/ynYMFyFnz5Xkanibj3ihawGANZJ8whC0TTBWQ/s6+MD ol9ItC7qqYjPhNc/vic1V0lfRTnX+HbXh1Z3Rpl5WaDB8rvpH0Yf+qKA9msMzLuIZm1+ g8pQ== X-Gm-Message-State: AOAM532ISJaNGrwa/7ODarafnlorFLpvc9KIIuMUYtNOMEothi2PFzzp JJscrv/vv8VKI/NBQeB2GKXw37kX4YhlPWtxX4G19TKeDqRgaWu8qbw0CzpSpeA7pd6ZJfjZVwQ 5N4EVatcOxfKQ/84= X-Received: by 2002:a7b:cd95:: with SMTP id y21mr11574009wmj.147.1591952114995; Fri, 12 Jun 2020 01:55:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUvjv2ITtyGVOuRQGlp5Dy5oc6bi81ezaxeL9w6O2df3WzesCaq1aOnUAJafAqdYdFKVZI5w== X-Received: by 2002:a7b:cd95:: with SMTP id y21mr11573989wmj.147.1591952114785; Fri, 12 Jun 2020 01:55:14 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id i10sm8920420wrw.51.2020.06.12.01.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 05/12] hw/tpm: Include missing 'qemu/option.h' header Date: Fri, 12 Jun 2020 10:54:37 +0200 Message-Id: <20200612085444.8362-6-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200612085444.8362-1-philmd@redhat.com> References: <20200612085444.8362-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/12 04:55:01 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 , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Files using the TPM_STANDARD_CMDLINE_OPTS macro declared in "tpm_int.h" will use QEMU_OPT_STRING definition declared in "qemu/option.h". Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_int.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h index 3fb28a9d6c..fd5ebc6489 100644 --- a/hw/tpm/tpm_int.h +++ b/hw/tpm/tpm_int.h @@ -12,6 +12,8 @@ #ifndef TPM_TPM_INT_H #define TPM_TPM_INT_H +#include "qemu/option.h" + #define TPM_STANDARD_CMDLINE_OPTS \ { \ .name = "type", \ From patchwork Fri Jun 12 08:54:39 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: 280640 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 93017C433DF for ; Fri, 12 Jun 2020 08:59:30 +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 610B7206D7 for ; Fri, 12 Jun 2020 08:59:30 +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="XJM6GPY7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 610B7206D7 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]:51044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfX7-0005bq-OX for qemu-devel@archiver.kernel.org; Fri, 12 Jun 2020 04:59:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfTG-0005s1-WC for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:31 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:56692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjfTF-00072c-Fd for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952128; 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=Ux4aj329B1BwmC7nDJ/LNHc4D/BIeJqak7rhlE6WHSo=; b=XJM6GPY7PGeb21RWpU0FH80kqbNx50CPDAfiK3GQ7vxMCfEUqWo3+s55jpm+yQwUjvIdFi XnAKupLPWe1CatDEQpSLaQstqQdOGDEkh7grWbFof+adIp1VyH7uQi/Dn9ZSgSOm4aqbJR CvCE5IedmhGO+fidajhgh32rqtcPuuQ= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-Dj3fb3Z9M8GwDrsLrOR37A-1; Fri, 12 Jun 2020 04:55:27 -0400 X-MC-Unique: Dj3fb3Z9M8GwDrsLrOR37A-1 Received: by mail-wr1-f72.google.com with SMTP id z10so3673439wrs.2 for ; Fri, 12 Jun 2020 01:55:26 -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=Ux4aj329B1BwmC7nDJ/LNHc4D/BIeJqak7rhlE6WHSo=; b=QnOxOk8o23ALZ12/oHMApn7oa/aXVKfg4pqC+67HR9ONBdUdv70KXkld3kLfjM0ymb jJykOm/exmjwaavTNRzP7ibw4qdHdeVPcQ1JpRxiJrg0KNvheeNlwUqaZUGfBMIOa9LH V0xpnHF2n7Tfqo8gr0/Ng52m08LNnfvv3zi8NdLrKA3JEsPk3Sj5opHd+gaCQvPKf1co jpubEc+5zID1g5fDBOXHQJlEHLy2RO+K3M2M/Ei0IwWFg3zzONunbWE53kM9pSLGv/Er psDBUcVGdrYFMCi4EFZUmOHa7Efn9w5YL/r0rVYqOTWpnxlmRkOLQYiRWU89dhku9EO8 PLQg== X-Gm-Message-State: AOAM532aswN5DbOmYQtAYvui0dyEuh/p/WzMiunU6m8KrcmpVNEr83xH 8WhBNL1x0K3usZHfpjp8RUG9yqL81ZTBRnhEgStdblcRGnHDOmINziAT7SpbZUC1c3ba6YEgl5G qnNhN6nq0bs59L9s= X-Received: by 2002:a1c:4d14:: with SMTP id o20mr11816641wmh.164.1591952125589; Fri, 12 Jun 2020 01:55:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn4AIarmHlyTc0Co/D9RI+jVWPhzNCDsweBrdQ5el+bccYOS/5OVfdrqjwdTAd0n0gryIEqQ== X-Received: by 2002:a1c:4d14:: with SMTP id o20mr11816624wmh.164.1591952125402; Fri, 12 Jun 2020 01:55:25 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id w1sm7799805wmi.13.2020.06.12.01.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:24 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 07/12] hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion Date: Fri, 12 Jun 2020 10:54:39 +0200 Message-Id: <20200612085444.8362-8-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200612085444.8362-1-philmd@redhat.com> References: <20200612085444.8362-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-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/12 04:55:28 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 , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Remove unnecessary 'tpm_int.h' header inclusion. Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_crb.c | 1 - hw/tpm/tpm_spapr.c | 1 - hw/tpm/tpm_tis_common.c | 1 - 3 files changed, 3 deletions(-) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index cd004e7f8e..664ff70ef9 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -25,7 +25,6 @@ #include "migration/vmstate.h" #include "sysemu/tpm_backend.h" #include "sysemu/reset.h" -#include "tpm_int.h" #include "tpm_util.h" #include "tpm_ppi.h" #include "trace.h" diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index ce65eb2e45..ab1a86ad6e 100644 --- a/hw/tpm/tpm_spapr.c +++ b/hw/tpm/tpm_spapr.c @@ -20,7 +20,6 @@ #include "migration/vmstate.h" #include "sysemu/tpm_backend.h" -#include "tpm_int.h" #include "tpm_util.h" #include "hw/ppc/spapr.h" diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c index 1af4bce139..94704870f6 100644 --- a/hw/tpm/tpm_tis_common.c +++ b/hw/tpm/tpm_tis_common.c @@ -33,7 +33,6 @@ #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "sysemu/tpm_backend.h" -#include "tpm_int.h" #include "tpm_util.h" #include "tpm_ppi.h" #include "trace.h" From patchwork Fri Jun 12 08:54:40 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: 280641 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 0B4EBC433E0 for ; Fri, 12 Jun 2020 08:58:15 +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 C9758206D7 for ; Fri, 12 Jun 2020 08:58:14 +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="QxlE1exB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9758206D7 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]:45128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfVu-0003Fq-3K for qemu-devel@archiver.kernel.org; Fri, 12 Jun 2020 04:58:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfTN-00066y-9B for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:37 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:51785 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 1jjfTL-00075R-N1 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952135; 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=ivyv44xux+7XXoWqIGIFlp2J/zNwQnYxF0RJgaexm5s=; b=QxlE1exBbi3UXCL/peQ9FpQ87b4HhP5Tnfi5yLRNeW/0QYujX6xbKNc0v/gxAPRV8fuKqT V7FpGWZZ1c2NP8BjAskYXttblB3ZWvrPtdLCxadTwUtIVn6INWPM6/cApJatEGBCRp9s+I gUaRVLDyvED0HXfx9ZKTzyLv7zVaDDM= 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-431-snoDi3QrOqS8XAUIdZvv-Q-1; Fri, 12 Jun 2020 04:55:32 -0400 X-MC-Unique: snoDi3QrOqS8XAUIdZvv-Q-1 Received: by mail-wr1-f69.google.com with SMTP id m14so3643282wrj.12 for ; Fri, 12 Jun 2020 01:55:32 -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=ivyv44xux+7XXoWqIGIFlp2J/zNwQnYxF0RJgaexm5s=; b=ePIORhNKAoKwzqS50jVmM1X6x71OjTI6OvGjgIzGtp8nr8AIk3SYQpjp0LYrK6CKLv 7dxE7njaPfAzcc1HwRHrbTEh7EMNqCPe9kR25pzVM+P+FdOybnWZNDHnZr1WHkksBFOz tLQBuyXYt4zUsrvyoQQ+3niByHtuELHh3RKA/Qec/C0GywIzEaQWdekl11MCqU88fBS2 MtW//Wnz3V+26pZSD4cv/RbQOd4ruQ8rIed3haniCsVXyn6e6eRBLzcW33SEirzhxwCy fY81RqQLepJoVFQwqU0f7VY4SX+uG1OOeiKmsJHzNTTAA9foBHOc3iY4htDaUGbFlUfh aErg== X-Gm-Message-State: AOAM530QFx8XaG3Bb3mSS6B3OX4UbqEu3GM2zllQ4k9AweKGM4EncXyI a6ps3eqw6KQp9bIIUANH4jypq/ATWJo5oEWXeMnpzECCd98HTZNjDLi8qk9P5YFGT7WRWaDEQob TbusqXQw+TD27EbU= X-Received: by 2002:adf:f4d0:: with SMTP id h16mr13808627wrp.230.1591952130949; Fri, 12 Jun 2020 01:55:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/1j0Bdv+A/TBhB2J0XdCQJgpvvavymbtOLMXW8kG62ErUOnyusHhs9y/pOUKVjBRcpwunrw== X-Received: by 2002:adf:f4d0:: with SMTP id h16mr13808601wrp.230.1591952130723; Fri, 12 Jun 2020 01:55:30 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id b81sm8394553wmc.5.2020.06.12.01.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 08/12] hw/tpm: Make TRACE_TPM_UTIL_SHOW_BUFFER check local to tpm_util.c Date: Fri, 12 Jun 2020 10:54:40 +0200 Message-Id: <20200612085444.8362-9-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200612085444.8362-1-philmd@redhat.com> References: <20200612085444.8362-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/12 04:55:01 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 , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The trace_event_get_state_backends() call is useful to avoid making extensive calls (usually preparing arguments passed to the tracing framework. In this case, the extensive work is done in tpm_util_show_buffer(), and the arguments used to call it don't involve extra processing. Simplify by moving the TRACE_TPM_UTIL_SHOW_BUFFER check to tpm_util_show_buffer. Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_tis_common.c | 8 ++------ hw/tpm/tpm_util.c | 3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c index 94704870f6..1779b4fc1e 100644 --- a/hw/tpm/tpm_tis_common.c +++ b/hw/tpm/tpm_tis_common.c @@ -78,9 +78,7 @@ static void tpm_tis_sts_set(TPMLocality *l, uint32_t flags) */ static void tpm_tis_tpm_send(TPMState *s, uint8_t locty) { - if (trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER)) { - tpm_util_show_buffer(s->buffer, s->be_buffer_size, "To TPM"); - } + tpm_util_show_buffer(s->buffer, s->be_buffer_size, "To TPM"); /* * rw_offset serves as length indicator for length of data; @@ -246,9 +244,7 @@ void tpm_tis_request_completed(TPMState *s, int ret) s->loc[locty].state = TPM_TIS_STATE_COMPLETION; s->rw_offset = 0; - if (trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER)) { - tpm_util_show_buffer(s->buffer, s->be_buffer_size, "From TPM"); - } + tpm_util_show_buffer(s->buffer, s->be_buffer_size, "From TPM"); if (TPM_TIS_IS_VALID_LOCTY(s->next_locty)) { tpm_tis_abort(s); diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c index c0a0f3d71f..12f19465c5 100644 --- a/hw/tpm/tpm_util.c +++ b/hw/tpm/tpm_util.c @@ -357,6 +357,9 @@ void tpm_util_show_buffer(const unsigned char *buffer, size_t len, i; char *line_buffer, *p; + if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER)) { + return; + } len = MIN(tpm_cmd_get_size(buffer), buffer_size); /* From patchwork Fri Jun 12 08:54:42 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: 280639 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 196D9C433E0 for ; Fri, 12 Jun 2020 09:02:39 +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 D5C1520801 for ; Fri, 12 Jun 2020 09:02:38 +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="XpuP9p3f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5C1520801 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]:56200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfaA-0000Pq-46 for qemu-devel@archiver.kernel.org; Fri, 12 Jun 2020 05:02:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfTZ-0006Yj-F0 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:49 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:56443 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 1jjfTX-0007AF-GB for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952146; 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=OEBGBSENtvQqVBtd9DaoSVHe6pzGLtI0FdTlX7YOxdE=; b=XpuP9p3fL/vdILAovmJOwG/jcNwTA7oMbp5DZgPmDkIyHnW6VPJiia+6WOYIOJAy8iWE9U 1y7Kci6fmN7ege1OTHyRDhO8DARE8hp7G4i9J+iesUG022QwNYZuvYA+td/3emrrspsyO6 qtrvFbUE7JHo1TmEnl3zVM39FU7KYMk= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-wtbmc-rDP0-Eh2Ueu71NKQ-1; Fri, 12 Jun 2020 04:55:43 -0400 X-MC-Unique: wtbmc-rDP0-Eh2Ueu71NKQ-1 Received: by mail-wm1-f70.google.com with SMTP id k185so1678534wme.8 for ; Fri, 12 Jun 2020 01:55:42 -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=OEBGBSENtvQqVBtd9DaoSVHe6pzGLtI0FdTlX7YOxdE=; b=UO6Qk+3yv6H6yr8cmdRxhGLFQx3zp+CjGofNd5opQwhTs1zsReNRdIEbzFJupYvbpd uCLIHqyFszlEt2/hardRsDtOwWX6EHzrgCkLfVG8Hd+Tqq9yOFAuEH91vI21M7SBPddb /D0Jmr3T1M56Ln/lSx/4JqshIAfml2vnbBNT/5hANvBRizKQtL/847TJwXsy6XWv+SgQ 7hfqsuBaiWjDUv1eAmbCrGm/e6lG+QEX2wo0uwkZ8JBXDLdyy9m+8Jl5v/G9ZcZsFecr PGorEgHFBnQDcmL5zcrmMs2vgcB2ITiEFaayZ8V2XbA4G+6IcUdHv0GdU8ODm6VfjQ4w Ff+w== X-Gm-Message-State: AOAM530NGbNxoWbLLrQgi7xCbwPBVbiIjLUbkGIHcy1kPF4eYo6SLvnE V/2LutvkiwSo8hfwGk0Jmr8n2u8Dg3vHAobW7zmG/Cii+0GtiX1ZeOVMj87TjF0wbxUfLhvfRFq G25lUbLfEs4hzd9c= X-Received: by 2002:a1c:3bc2:: with SMTP id i185mr12588059wma.33.1591952141459; Fri, 12 Jun 2020 01:55:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFY/m5AQtIAcilcRUYPHfC/lXiBCbq6fXKwRP9ToC/+wsEAe+Qcy1dtqD5HJTOHkiGaJ6GRw== X-Received: by 2002:a1c:3bc2:: with SMTP id i185mr12588037wma.33.1591952141189; Fri, 12 Jun 2020 01:55:41 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id j16sm10439181wre.21.2020.06.12.01.55.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 10/12] hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header Date: Fri, 12 Jun 2020 10:54:42 +0200 Message-Id: <20200612085444.8362-11-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200612085444.8362-1-philmd@redhat.com> References: <20200612085444.8362-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/12 04:55:28 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 , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , David Gibson 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 the next commit. The DEFINE_PROP_TPMBE() macro is only meaningful for the TPM hardware files (in hw/tpm/), so keep this macro in a local header. Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_prop.h | 31 +++++++++++++++++++++++++++++++ hw/tpm/tpm_util.h | 3 --- hw/tpm/tpm_crb.c | 1 + hw/tpm/tpm_spapr.c | 1 + hw/tpm/tpm_tis_isa.c | 2 +- hw/tpm/tpm_tis_sysbus.c | 2 +- 6 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 hw/tpm/tpm_prop.h diff --git a/hw/tpm/tpm_prop.h b/hw/tpm/tpm_prop.h new file mode 100644 index 0000000000..85e1ae5718 --- /dev/null +++ b/hw/tpm/tpm_prop.h @@ -0,0 +1,31 @@ +/* + * TPM utility functions + * + * Copyright (c) 2010 - 2015 IBM Corporation + * Authors: + * Stefan Berger + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see + */ + +#ifndef HW_TPM_PROP_H +#define HW_TPM_PROP_H + +#include "sysemu/tpm_backend.h" +#include "hw/qdev-properties.h" + +#define DEFINE_PROP_TPMBE(_n, _s, _f) \ + DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *) + +#endif /* HW_TPM_PROP_H */ diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h index d524935576..cf61d830d7 100644 --- a/hw/tpm/tpm_util.h +++ b/hw/tpm/tpm_util.h @@ -66,9 +66,6 @@ static inline void tpm_cmd_set_error(void *b, uint32_t error) stl_be_p(b + 6, error); } -#define DEFINE_PROP_TPMBE(_n, _s, _f) \ - DEFINE_PROP(_n, _s, _f, qdev_prop_tpm, TPMBackend *) - void tpm_util_show_buffer(const unsigned char *buffer, size_t buffer_size, const char *string); diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index 664ff70ef9..1cac4d671d 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -25,6 +25,7 @@ #include "migration/vmstate.h" #include "sysemu/tpm_backend.h" #include "sysemu/reset.h" +#include "tpm_prop.h" #include "tpm_util.h" #include "tpm_ppi.h" #include "trace.h" diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index ab1a86ad6e..65672048c7 100644 --- a/hw/tpm/tpm_spapr.c +++ b/hw/tpm/tpm_spapr.c @@ -21,6 +21,7 @@ #include "sysemu/tpm_backend.h" #include "tpm_util.h" +#include "tpm_prop.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_vio.h" diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index 42f909ff1e..5faf6231c0 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -27,7 +27,7 @@ #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "hw/acpi/tpm.h" -#include "tpm_util.h" +#include "tpm_prop.h" #include "tpm_tis.h" typedef struct TPMStateISA { diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index edca1dae0d..4a3bc70625 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -26,7 +26,7 @@ #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "hw/acpi/tpm.h" -#include "tpm_util.h" +#include "tpm_prop.h" #include "hw/sysbus.h" #include "tpm_tis.h" From patchwork Fri Jun 12 08:54:43 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: 280638 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 2DA8DC433DF for ; Fri, 12 Jun 2020 09:03:51 +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 E6C6E206D7 for ; Fri, 12 Jun 2020 09:03:50 +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="Znu+C0OW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6C6E206D7 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]:59614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfbJ-0001py-I6 for qemu-devel@archiver.kernel.org; Fri, 12 Jun 2020 05:03:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfTd-0006is-8i for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:53 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31901 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 1jjfTb-0007Bk-By for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952150; 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=kgH8nCluDpl2P0gq4wKs7A/1SKsUvPl7A42U958qeTQ=; b=Znu+C0OWuGFHCNaAjUT0C4C8Ei3l9u4zolvpPt9LJALDVfYYYL1I3yy6T/9iCe9077A3Jo REPCqb6BzZA9mJpAUW3ujX/5tNLhp/4fvkuECsaMHANLLlCy2YEzpFIC8rbYXeEGh3dLDb WrYkTfkgIS3Lzo9iEFfIiuuajbPg1L0= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-139-Q8eF7a9pORisllNZxAGA-A-1; Fri, 12 Jun 2020 04:55:49 -0400 X-MC-Unique: Q8eF7a9pORisllNZxAGA-A-1 Received: by mail-wm1-f70.google.com with SMTP id c4so2185602wmd.0 for ; Fri, 12 Jun 2020 01:55:49 -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=kgH8nCluDpl2P0gq4wKs7A/1SKsUvPl7A42U958qeTQ=; b=TV9/AE245R3aYCsUqc1NXlR4cOUnC+oBLxPe9kwznYMe7h/fOa3D/aTlhybU3N38ow Q90Fq79WDqOGPF+vTIAXX2/MX2bkw8vYUR7+WkwMrLw7WurFlb/oBGN2QTDMx2Coaafc Biu0drx1uXWIs8YZsktlKFuHYK8ZNxvOpV7ruvMIbtnQ3S951LUMkYSOtJE+rytLBrAC ZA2z/DqE8gFmw2SiWezvXlWCvNKfaxI/gGT4QES2wszIy1zfN+XsB4shO3V6WdYFn+9i FGTeyY66xG8/GmD5aG0U3Mbm+aJTn55EI2HdJpaEha78FAhRi2a/LmIrMga4GvH4anaw +mzQ== X-Gm-Message-State: AOAM533HMU8DWFSluYtw3DutovnVp847/07mw8m94ARowQ8Iha8H15BZ Xja4sq3w7NJR5CdVItn9CIjiwqaKIl6zVFZ5+XG4WOPFzSfqupTenyokM0qLUfb9TdlpEppGJAM OJAf0PR0RbWJ+zgc= X-Received: by 2002:a1c:1b13:: with SMTP id b19mr11984720wmb.84.1591952147008; Fri, 12 Jun 2020 01:55:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTKoyZ8gS53Jnwdw1aVXI3nBcjwhVeYgcZP4TYR0j2OCXwaMXunJBADDs7DNaNCbWCf03yhw== X-Received: by 2002:a1c:1b13:: with SMTP id b19mr11984703wmb.84.1591952146733; Fri, 12 Jun 2020 01:55:46 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id n204sm8348572wma.5.2020.06.12.01.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 11/12] hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h" Date: Fri, 12 Jun 2020 10:54:43 +0200 Message-Id: <20200612085444.8362-12-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200612085444.8362-1-philmd@redhat.com> References: <20200612085444.8362-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/12 03:11:46 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 , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We are going to split the TPM backends from the TPM emulated hardware in the next commit. Make the TPM util helpers accessible by moving local "tpm_util.h" to global "sysemu/tpm_util.h". Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daudé --- docs/specs/tpm.rst | 4 ++-- {hw/tpm => include/sysemu}/tpm_util.h | 6 +++--- hw/tpm/tpm_crb.c | 2 +- hw/tpm/tpm_emulator.c | 2 +- hw/tpm/tpm_passthrough.c | 2 +- hw/tpm/tpm_spapr.c | 2 +- hw/tpm/tpm_tis_common.c | 2 +- hw/tpm/tpm_util.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) rename {hw/tpm => include/sysemu}/tpm_util.h (95%) diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst index 9e48e3b981..0200fdac68 100644 --- a/docs/specs/tpm.rst +++ b/docs/specs/tpm.rst @@ -234,7 +234,7 @@ PCRs. QEMU files related to the TPM passthrough device: - ``hw/tpm/tpm_passthrough.c`` - ``hw/tpm/tpm_util.c`` - - ``hw/tpm/tpm_util.h`` + - ``include/sysemu/tpm_util.h`` Command line to start QEMU with the TPM passthrough device using the host's @@ -294,7 +294,7 @@ command. QEMU files related to the TPM emulator device: - ``hw/tpm/tpm_emulator.c`` - ``hw/tpm/tpm_util.c`` - - ``hw/tpm/tpm_util.h`` + - ``include/sysemu/tpm_util.h`` The following commands start the swtpm with a UnixIO control channel over a socket interface. They do not need to be run as root. diff --git a/hw/tpm/tpm_util.h b/include/sysemu/tpm_util.h similarity index 95% rename from hw/tpm/tpm_util.h rename to include/sysemu/tpm_util.h index cf61d830d7..63e872c3b2 100644 --- a/hw/tpm/tpm_util.h +++ b/include/sysemu/tpm_util.h @@ -19,8 +19,8 @@ * License along with this library; if not, see */ -#ifndef TPM_TPM_UTIL_H -#define TPM_TPM_UTIL_H +#ifndef SYSEMU_TPM_UTIL_H +#define SYSEMU_TPM_UTIL_H #include "sysemu/tpm.h" #include "qemu/bswap.h" @@ -69,4 +69,4 @@ static inline void tpm_cmd_set_error(void *b, uint32_t error) void tpm_util_show_buffer(const unsigned char *buffer, size_t buffer_size, const char *string); -#endif /* TPM_TPM_UTIL_H */ +#endif /* SYSEMU_TPM_UTIL_H */ diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index 1cac4d671d..60247295d4 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -24,9 +24,9 @@ #include "hw/acpi/tpm.h" #include "migration/vmstate.h" #include "sysemu/tpm_backend.h" +#include "sysemu/tpm_util.h" #include "sysemu/reset.h" #include "tpm_prop.h" -#include "tpm_util.h" #include "tpm_ppi.h" #include "trace.h" diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index 3a0fc442f3..9605339f93 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/tpm_emulator.c @@ -32,8 +32,8 @@ #include "qemu/sockets.h" #include "io/channel-socket.h" #include "sysemu/tpm_backend.h" +#include "sysemu/tpm_util.h" #include "tpm_int.h" -#include "tpm_util.h" #include "tpm_ioctl.h" #include "migration/blocker.h" #include "migration/vmstate.h" diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index f67244b5d4..7403807ec4 100644 --- a/hw/tpm/tpm_passthrough.c +++ b/hw/tpm/tpm_passthrough.c @@ -28,10 +28,10 @@ #include "qemu/module.h" #include "qemu/sockets.h" #include "sysemu/tpm_backend.h" +#include "sysemu/tpm_util.h" #include "tpm_int.h" #include "qapi/clone-visitor.h" #include "qapi/qapi-visit-tpm.h" -#include "tpm_util.h" #include "trace.h" #define TYPE_TPM_PASSTHROUGH "tpm-passthrough" diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index 65672048c7..cb4dfd1e6a 100644 --- a/hw/tpm/tpm_spapr.c +++ b/hw/tpm/tpm_spapr.c @@ -20,7 +20,7 @@ #include "migration/vmstate.h" #include "sysemu/tpm_backend.h" -#include "tpm_util.h" +#include "sysemu/tpm_util.h" #include "tpm_prop.h" #include "hw/ppc/spapr.h" diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c index 1779b4fc1e..e700d82181 100644 --- a/hw/tpm/tpm_tis_common.c +++ b/hw/tpm/tpm_tis_common.c @@ -33,7 +33,7 @@ #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "sysemu/tpm_backend.h" -#include "tpm_util.h" +#include "sysemu/tpm_util.h" #include "tpm_ppi.h" #include "trace.h" diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c index 12f19465c5..cfc7572a61 100644 --- a/hw/tpm/tpm_util.c +++ b/hw/tpm/tpm_util.c @@ -23,11 +23,11 @@ #include "qemu/error-report.h" #include "qapi/error.h" #include "qapi/visitor.h" -#include "tpm_util.h" #include "tpm_int.h" #include "exec/memory.h" #include "hw/qdev-properties.h" #include "sysemu/tpm_backend.h" +#include "sysemu/tpm_util.h" #include "trace.h" /* tpm backend property */