From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952169; cv=none; d=zohomail.com; s=zohoarc; b=VXqlPUlpPuEUuw3GWZ8JXSHSPbb9yG7J0L3CuorILkSIzkCeMk4XxE5QwjpGN3F+OXbZMtuK3I/hlZQbN53aLouhPSMIbkhWFOMdWQe5GFXI9W3LBjwQpNPlxPQ7ru4dA5fKEwZ/k/d+F4J1AOto7rznwf1XHuWEf5Hm5kkFHH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952169; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5GHBSuF7Q+CJBw+7dBn2iaHmKbWBMMH0+Nvg3ibl58s=; b=OrymMDJS6jMmMA+2foqktIVJSSeYSO5WNMoFRuCbeL46m4kfTYWG04BOM2Krf1ewxy3hPTf1VLbCSN81KjG55zO3AhCtLMyPOzw0bn4fOozkEnTQFUkLKgOmHEuhCYc1B96SrJ1WvSdxYGdGTxI6wVrMbuOL3gVEcdzu30pfUjs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952169415849.2908177544216; Fri, 12 Jun 2020 01:56:09 -0700 (PDT) Received: from localhost ([::1]:35050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfTr-0006bh-Iy for importer@patchew.org; Fri, 12 Jun 2020 04:56:07 -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 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 Received: by mail-wr1-f71.google.com with SMTP id l1so3642490wrc.8 for ; Fri, 12 Jun 2020 01:54:54 -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) 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= X-MC-Unique: KMTnKCFdNBG-YQmWoPjcKQ-1 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) From: =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Commit 8dc6701722 introduce the documentation but an incorrect path name was used. Fix that. Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 ba= ckend. =20 QEMU files related to TPM backends: - ``backends/tpm.c`` + - ``include/sysemu/tpm.h`` - ``include/sysemu/tpm_backend.h`` - - ``include/sysemu/tpm_backend_int.h`` =20 The QEMU TPM passthrough device ------------------------------- --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952176; cv=none; d=zohomail.com; s=zohoarc; b=X0J/fNPSueDwHi6u9ChSzzJRz4Hjhrs/jxJSCVmb6zgPmjboSigxir4WXQinXYcy9UsY1vpzvDKKSSPzdQbSJ4AA5b+sAixaXa2ySHxOiy9EgcFL2wDRBiQx1tCsqHjg5Py3dVFq7DkghzG5H7br6VQTXi3Me9HCmVSxs5KyUhI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952176; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9HZwOVjviVKxzbK+VbediPY+NgHJde8KRqV1RN+ZuZw=; b=IkSMBtdx4h3g5G71ri73CE08BTbM33HWTCOmCH/9AX47mOHKshDzaxuvcG1pOBb7w+oqFPS/Ojpdn4Huy+2+0+u5Kea64Ueo9D1E8w8RRBlwmd0IjPUQk7AYpXcZvRm+Pvd6YYrPoRVOhDAbty4ZaIprK7K0M/yP+AeV4/WVkI8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952175905231.7219369213825; Fri, 12 Jun 2020 01:56:15 -0700 (PDT) Received: from localhost ([::1]:35828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfTy-0006yF-Jw for importer@patchew.org; Fri, 12 Jun 2020 04:56:14 -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 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 Received: by mail-wr1-f72.google.com with SMTP id z10so3672975wrs.2 for ; Fri, 12 Jun 2020 01:55:00 -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) 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= X-MC-Unique: XJSfQGbANOyx9HpZ48J8RQ-1 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) From: =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 --- backends/{tpm.c =3D> 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 =3D> 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 =20 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 +=3D rng.o rng-egd.o rng-builtin.o common-obj-$(CONFIG_POSIX) +=3D rng-random.o =20 -common-obj-$(CONFIG_TPM) +=3D tpm.o +common-obj-$(CONFIG_TPM) +=3D tpm/ =20 common-obj-y +=3D hostmem.o hostmem-ram.o common-obj-$(CONFIG_POSIX) +=3D 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 +=3D tpm_backend.o --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952291; cv=none; d=zohomail.com; s=zohoarc; b=UU7GSv6c66LzMZzqljBE5ZO9VbcL3Cz5q1bq1XnAO7jTZfiboroOA/6haIGn7pIgsSZaKtJFw7SX8x/3+3aDwjVI2Rh6gMl0bHmOcW3BQVsrNXDtgHlPBWJUheER+106uT8PTLQilNUzRUKV3VcnperXo/aL6hjEwp68pMy4+bs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952291; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ShKU7OwwvJdTi39LcBZXKgzHPvYAnCTLu/v0xUKYxK8=; b=cVDidqqoF/G5Hg0I9rR0nCkG//0efYqMeRNh0F3nXzyKaZ8hqLqD2Rwle+PYeJ+PLbEPOkmSKVUg1xX3bTGek7u5F5/+/yPXkvGzsLyfmdab+/9uMAckiEzgPCiFqpz00aU5Jgb6QEqS4LMdYBTi0ISYak4fFoJ6DlOZuP80g7A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952291056801.0951570277682; Fri, 12 Jun 2020 01:58:11 -0700 (PDT) Received: from localhost ([::1]:44260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfVp-0002ta-Qo for importer@patchew.org; Fri, 12 Jun 2020 04:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfT5-0005Xu-Ky for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:19 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:43034 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 1jjfT3-0006yu-Vv for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:19 -0400 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-37-0kPVnHzDNaiJVwXQxbQHlQ-1; Fri, 12 Jun 2020 04:55:05 -0400 Received: by mail-wm1-f69.google.com with SMTP id j128so2182099wmj.6 for ; Fri, 12 Jun 2020 01:55:05 -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 l204sm8372355wmf.19.2020.06.12.01.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952117; 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=ShKU7OwwvJdTi39LcBZXKgzHPvYAnCTLu/v0xUKYxK8=; b=DI7o7Cpt2CkQ9VrpZM8BCGX4Z3ly6N3NahPWU3cNTje5kAe1kt5G+fJSm/tX71CSUiC19k drr+6aHgJN8VI+PXwKlJG9tpK2k/2Gr+eLUkY3ZoKWFhaq1VfovzpVQ0KJOkCSPSLSEW53 FuNRPmE0nxxgcpHgVitM16VMySKP/aw= X-MC-Unique: 0kPVnHzDNaiJVwXQxbQHlQ-1 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=ShKU7OwwvJdTi39LcBZXKgzHPvYAnCTLu/v0xUKYxK8=; b=ixeLRhkLuC3Rig8GUvMCo668maEsWuORzDNJ8IxxL+ayUGyB59lnwCcsBPSlT3roel 3bRp6vrxKA0HrbFUuZjH3hwbbPRz5Hha/wDtxLTEU3GlC0fq6nNxWiCtOe/+HQ4mUTIJ 1PGQDs3IBSHjAc1bTa72FJnxqx9KN1tUDl7rgczNeUI62A0Y0pQNazy+5fQKiGivkTqf BBUORW0nrn3d3nJZPUCd8Rp/OddTHS7Eqpni17o93IZSN8s3DL4aDaQs+KQKBP+tG18H ttvsm+l7MNr1+9BxpywadHWc1bhwHrvV+Fy6ELUcJQYYdYGuE0iZS515ItG4wAzIMk42 WhBg== X-Gm-Message-State: AOAM530p4LWz6uYQERWlPQlYCWwxEX4CRGyKK95JHHNmwGsbowJyzjL2 nBqiH46JWq5hKPEiT+wGoLni3CjGzXPmheDXS8SPu0CJ1m0WjlutiltKsn7XL7169n5dnAAEwfU C9UajKcAx02SZ3IA= X-Received: by 2002:adf:f5ca:: with SMTP id k10mr13496655wrp.305.1591952104495; Fri, 12 Jun 2020 01:55:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylG+S1WFf1YotXIn5EIY1fJ+xMXDJu8slr1UYOL/LUsGasKeBIXqJKMQkdL9JVpNqL5eRC9w== X-Received: by 2002:adf:f5ca:: with SMTP id k10mr13496640wrp.305.1591952104280; Fri, 12 Jun 2020 01:55:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 03/12] hw/tpm: Rename TPMDEV as TPM_BACKEND in Kconfig Date: Fri, 12 Jun 2020 10:54:35 +0200 Message-Id: <20200612085444.8362-4-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The TPMDEV describe TPM backends. Use the TPM_BACKEND config name which is self-explicit. Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/tpm/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig index 4794e7fe28..5028fd8880 100644 --- a/hw/tpm/Kconfig +++ b/hw/tpm/Kconfig @@ -1,4 +1,4 @@ -config TPMDEV +config TPM_BACKEND bool depends on TPM =20 @@ -15,26 +15,26 @@ config TPM_TIS_SYSBUS config TPM_TIS bool depends on TPM - select TPMDEV + select TPM_BACKEND =20 config TPM_CRB bool depends on TPM && PC - select TPMDEV + select TPM_BACKEND =20 config TPM_PASSTHROUGH bool default y # FIXME: should check for x86 host as well - depends on TPMDEV && LINUX + depends on TPM_BACKEND && LINUX =20 config TPM_EMULATOR bool default y - depends on TPMDEV + depends on TPM_BACKEND =20 config TPM_SPAPR bool default y depends on TPM && PSERIES - select TPMDEV + select TPM_BACKEND --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952184; cv=none; d=zohomail.com; s=zohoarc; b=SoABIB/XxlKIzEhueIVxye/ib/DYgvrf+r1JA9HxOsy7Hf4f9XgO+EUQv0EliLXAXQ/o+FE7fs+nTW8vC/q5IpImVGh2GP+Uk1XbJ9aJTIENTndsuneYOF5hJNjpWF8/8IRoThfVzAk0l2CLfLGq1GSsgDYwYB0Wc5IP4O/fnBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952184; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lg93mmx8nphNH1y4bYZrwT9M+1WJW6lG0NFyoN2HHMc=; b=gEO4ePG3LK8EklVRTklnWHpLP24d8kwzgvWkQZmvT+cvjOfcUSVG39v1mG8WyeExAd9g1Kc5y6nD27wkj9TtZpJje9YrS0mm3iSey3gh03x58QcEFGe6yPefiVXd3fQ3g4NAMiglsCiRb65Z39wiRt/MOulbdlSbigKWZLyNbAg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952184529960.6646222920384; Fri, 12 Jun 2020 01:56:24 -0700 (PDT) Received: from localhost ([::1]:36684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfU7-0007Rl-C8 for importer@patchew.org; Fri, 12 Jun 2020 04:56:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfT7-0005Z6-AU for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:21 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39136 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 1jjfT4-0006z1-J1 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:19 -0400 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-514-bvhjp0dkNF-XxB8H7bF99w-1; Fri, 12 Jun 2020 04:55:11 -0400 Received: by mail-wm1-f71.google.com with SMTP id b63so3581511wme.1 for ; Fri, 12 Jun 2020 01:55:10 -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 d24sm7693353wmb.45.2020.06.12.01.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952117; 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=lg93mmx8nphNH1y4bYZrwT9M+1WJW6lG0NFyoN2HHMc=; b=TNMB+xtVttGNGM+ysYmUvxSm4xJdRKhNs5JJ0eLwRnJBJAbym1WmoT8WYxFsuKz3posQqi NewoqMA3CEkQ7f4dlGPmgUCGWOdE7n20B30J6g+dbyGyMBeQRnXPn/nTctmcqyhXaj+K7W igx4chAHgc7O6PtvogQ0Zo4/WxtR5E8= X-MC-Unique: bvhjp0dkNF-XxB8H7bF99w-1 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=lg93mmx8nphNH1y4bYZrwT9M+1WJW6lG0NFyoN2HHMc=; b=JKuIODMTBMgAz3tWe+yJJofthmynX2EqRz9NVcWS2IHg6BVi9r3AcJ7AQqMZxW9Hpl S5YbIbxST5OX7Hwnh6BCM7JkWRRkPQM5HgkFxhGsujUQCpUdRUE06AcigTMn0UjRBS1m BpThXSbfAXHdR5hqPTgSBtTDRSKMEb7oyNmpFX3E1z3+Vymw3dWLERbzaGwr1a7e1xex 4/wpIZSgZaNHb0UE4u7xdX6ODRAClBFLOLQ1vBzHh6+gXUhMolXKAq59IkgdqEeYBAYh dTJe0ccUQJP11W4Q1DuMQXjcowAuA8u5IFpRpg6t5sOUeTxMelNK/aPw2DBupj10RbBH KZ/w== X-Gm-Message-State: AOAM5330V/XC4m3ky42aBGMgxSmfm3ddh2yO+BA7ADISEGwNWP4QtvX4 ZNGhif9bS/gfXODDlQOiy4aM57RGx/Buyt3RyJA2nHhoj0/KGdwXPDysiLKeObwAhzdQbv7t53k aGWNR/1nLK7XNoV4= X-Received: by 2002:a05:600c:2153:: with SMTP id v19mr11856736wml.47.1591952109702; Fri, 12 Jun 2020 01:55:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK1SsH1g/ZqIDz1SJ2QIRIb/Emcyy4zImtouMadvAKTPVupewtUyXwEsQmPV4xP9JbliUHRg== X-Received: by 2002:a05:600c:2153:: with SMTP id v19mr11856720wml.47.1591952109469; Fri, 12 Jun 2020 01:55:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 04/12] hw/tpm: Do not include 'qemu/osdep.h' in header Date: Fri, 12 Jun 2020 10:54:36 +0200 Message-Id: <20200612085444.8362-5-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From CODING_STYLE.rst: Do not include "qemu/osdep.h" from header files since the .c file will have already included it. Remove "qemu/osdep.h" from "tpm_tis.h". Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/tpm/tpm_tis.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h index 5554989395..f6b5872ba6 100644 --- a/hw/tpm/tpm_tis.h +++ b/hw/tpm/tpm_tis.h @@ -24,7 +24,6 @@ #ifndef TPM_TPM_TIS_H #define TPM_TPM_TIS_H =20 -#include "qemu/osdep.h" #include "sysemu/tpm_backend.h" #include "tpm_ppi.h" =20 --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952289; cv=none; d=zohomail.com; s=zohoarc; b=ixsTixBLfspJ21ZvdIr6a7h5bfSKLL7xM+/voOEorSY8IWjrftLH7RNQOooeGme2UWyUBYvXD+rLAiJP+0Y6reD9tyFyREJEdUFuga4SFivX4mCm+t4hC2I9/R+8s6WROjVs+GMkPbWvk3XX0B0djZH3X5akGVuAztuB4xnCMqg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952289; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GhYz6sKF2bPYiUHoKS1Jnt6TjZbsEwWbEop5lmusuaY=; b=UsS2EJCdHvO/P2pMCE02PqivlVcwrTZDr23tRKcdhzBzD8OA8OAN5RM8IH1mB4XZrnBI+WNMkVnNuyt0l4vAutQmtdvl4ayC6Q3pmviQV/0F2nusXyngYwyNlJVsiL8c5sl6yNmI/uE6z8PB/g4VXy0cQ2Y3Bm4IOmnQf8pbkr4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952289005246.4887569137867; Fri, 12 Jun 2020 01:58:09 -0700 (PDT) Received: from localhost ([::1]:44074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfVn-0002pG-Or for importer@patchew.org; Fri, 12 Jun 2020 04:58:07 -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 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 Received: by mail-wm1-f71.google.com with SMTP id h25so3585359wmb.0 for ; Fri, 12 Jun 2020 01:55:16 -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) 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= X-MC-Unique: 0R3-TkmqOf-zmOvWSxEcjg-1 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) From: =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 --- 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 =20 +#include "qemu/option.h" + #define TPM_STANDARD_CMDLINE_OPTS \ { \ .name =3D "type", \ --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952321; cv=none; d=zohomail.com; s=zohoarc; b=OUskl9oyaSU6kSs5ICtdyfKWobAd7yK9IQavIyH9sZoRmps3UVIBxwrVzED6kjdpSA/SedTmHKzlsF5G8O5fS2wbVFxY0Oa+gjH5QjJpO+zvgNkoxV44bpeME/AOhqq/U5ATtj3gxqvfKK24Xnvq0gFXJFkR2WcItwH1xq0G7rI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952321; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=D2Oz/tFoTbJgZ+hpQsGEbztQQnHjY/PR/LdJBtph6qw=; b=jSGUrNSmnyaOsHbvQb4ULyu1G5JxIJwHK9HoardPc2KviCyONTh6ZwMcurUCVLbDaXxVjy6LfXVydFggpjDzmStRfJZbhtBkGXiiL4SJmHYKky8jrdIIc4r5NFbdEUz0XyuUtJLKCmQQRgNb0t/0lgTjmEgXMUGMUtx3Nom4cHc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952321679794.0547079301253; Fri, 12 Jun 2020 01:58:41 -0700 (PDT) Received: from localhost ([::1]:46546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfWK-0003od-GD for importer@patchew.org; Fri, 12 Jun 2020 04:58:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfTB-0005hL-Lw for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:26 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39754 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 1jjfTA-0006zZ-5c for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:25 -0400 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-308-AH0Gpw2gMiCgLqv2OfgvmA-1; Fri, 12 Jun 2020 04:55:21 -0400 Received: by mail-wm1-f71.google.com with SMTP id 11so1679300wmj.6 for ; Fri, 12 Jun 2020 01:55:21 -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 t7sm8396164wrq.41.2020.06.12.01.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952123; 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=D2Oz/tFoTbJgZ+hpQsGEbztQQnHjY/PR/LdJBtph6qw=; b=DA3iewRt4nme0elNNPvNt2fQkhFuSSGJG+USUXkbL/TWyhqFPn8huOzN/8qVwZEi9JGkC9 wCT4AJg7EYCwpqZfzQXeVkK8u3IWjl4Jq6Lei9Af9Gn22ZnwpvHKVu4JIE+t9HoNNCF7VX fcyBu1TKzCt2OoKRp9dMeV2ZMIBu2dM= X-MC-Unique: AH0Gpw2gMiCgLqv2OfgvmA-1 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=D2Oz/tFoTbJgZ+hpQsGEbztQQnHjY/PR/LdJBtph6qw=; b=sHriVZCHHr+KF792JZfr/Zrp6NPcgux5Y5puhNcuGC1ot7R48+OYJpQrlSgtyXiM9A ufp9scJdlJ/htO7grnbV/54qMU529iI09MBOir037FvGDtkNRCazWT/6tXEMl1KMt1be Xw3W8nQiDIl6r8WSb8S1OUYsdG5ExoloH3/wOECmjlCLAtGYCdxZIUJMA4SrN/4AyI7Y uFRVl1UP+TQE6ATinLcO+0H8Ji5Qa9tLRr7lVbGT7NfKsoRE5LTJGs9+Wy5VihT/83mK Os5JeygzGERYLz8gfLPA77/1Hhw2QbweZE5r2H3o9FryNRZHB3jd2Y0D5qCVOfrU+x/I 1yVA== X-Gm-Message-State: AOAM530tB+F+o+lbD+zs00b8LlHkPOZpfSbrl5OFECetQwqzU39XtEYC HvjLq6Hf1wvomaIbYUdRYod/tMI70elwyN9Z+JLa4hTc7BtXFYZZtBDBGr4io8rL5VUmqnF+KKv x+0A0N5aPsXrY828= X-Received: by 2002:adf:e78a:: with SMTP id n10mr14398809wrm.114.1591952120151; Fri, 12 Jun 2020 01:55:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnvjuTk03GTBGqHJhBe5MexDr/FYhNrw/G/+3BZOUOL1xtoOARpcs73NL/JfjjwO4rMvTZ9w== X-Received: by 2002:adf:e78a:: with SMTP id n10mr14398795wrm.114.1591952119928; Fri, 12 Jun 2020 01:55:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 06/12] hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources Date: Fri, 12 Jun 2020 10:54:38 +0200 Message-Id: <20200612085444.8362-7-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Nothing in "tpm_ppi.h" require declarations from "hw/acpi/tpm.h". Reduce dependencies and include it only in the files requiring it. Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/tpm/tpm_ppi.h | 1 - hw/tpm/tpm_ppi.c | 1 + hw/tpm/tpm_tis_isa.c | 1 + hw/tpm/tpm_tis_sysbus.c | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h index d33ef27de6..6f773c25a0 100644 --- a/hw/tpm/tpm_ppi.h +++ b/hw/tpm/tpm_ppi.h @@ -12,7 +12,6 @@ #ifndef TPM_TPM_PPI_H #define TPM_TPM_PPI_H =20 -#include "hw/acpi/tpm.h" #include "exec/address-spaces.h" =20 typedef struct TPMPPI { diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c index 6d9c1a3e40..72d7a3d926 100644 --- a/hw/tpm/tpm_ppi.c +++ b/hw/tpm/tpm_ppi.c @@ -17,6 +17,7 @@ #include "cpu.h" #include "sysemu/memory_mapping.h" #include "migration/vmstate.h" +#include "hw/acpi/tpm.h" #include "tpm_ppi.h" #include "trace.h" =20 diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index 30ba37079d..42f909ff1e 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -26,6 +26,7 @@ #include "hw/isa/isa.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "hw/acpi/tpm.h" #include "tpm_util.h" #include "tpm_tis.h" =20 diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index eced1fc843..edca1dae0d 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "hw/acpi/tpm.h" #include "tpm_util.h" #include "hw/sysbus.h" #include "tpm_tis.h" --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952373; cv=none; d=zohomail.com; s=zohoarc; b=hsIEAYAN2XmlgW3cQzx+LjJzL2QUktmZ5d1WC9E7tBw87WeWjlVXj/K5UiMv61cYpabgL78Sq+GAgVNLeyjPjL02qz0bG08Dpzh21/hdW5HIMGT8pLVOTtRM1neZhrDC0sjg5662oEqLwdtMy3wO9x5b2FHNxbJaXB7qKjJcgXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952373; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ux4aj329B1BwmC7nDJ/LNHc4D/BIeJqak7rhlE6WHSo=; b=Kol4LXeG09lLT0ZYpc0G/tEWqlzl98NosTJ+C3gCcFi0EIFPf+SSLG94llp4cXGACStrd3KPmOr7z0vvTGoM6MDHz9C+YZyNii3nXIOqOhjFHc0ZmAKYjapCLtfohXvZu44xLRZUbOdX7p9CXuiitMGXDoai8/444fMjTwCPnms= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952373579338.5903490421173; Fri, 12 Jun 2020 01:59:33 -0700 (PDT) Received: from localhost ([::1]:51044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfXA-0005bq-Da for importer@patchew.org; Fri, 12 Jun 2020 04:59:32 -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 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 Received: by mail-wr1-f72.google.com with SMTP id z10so3673439wrs.2 for ; Fri, 12 Jun 2020 01:55:26 -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) 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= X-MC-Unique: Dj3fb3Z9M8GwDrsLrOR37A-1 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) From: =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Remove unnecessary 'tpm_int.h' header inclusion. Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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" =20 #include "sysemu/tpm_backend.h" -#include "tpm_int.h" #include "tpm_util.h" =20 #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" --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952299; cv=none; d=zohomail.com; s=zohoarc; b=mStZ9BlV4TCSM8gP/4Y6rhB5wAeYtndm2908Gq2yyj1MeLOHCf6GwxwPth5Js4U0SddjkhIy6JuRMHeiNMGSmuB2CzV67SMOQF92ZqLaAIdw4b/00nnTEdZv/pj94EQtN4X52a74Z6u2EC0SSZ+QeVIt7f0UjVihExrVUp/gEuk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952299; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ivyv44xux+7XXoWqIGIFlp2J/zNwQnYxF0RJgaexm5s=; b=gFS8Nh0U+2PVLlABaB0wI3ftsMREShA4ek/QfmwUJfUOKSZSGIm724MB5Y8HRKCXKxntv/6w2+KxtuFkeJwFNCDpj0cPW9Fy3BKe0iW7e41oS4nu0Db+phPxxMFNFarzmhZbPhLUpj31s7S0V6wsPRNdlTwd4gVIelldsg7HbOU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952299463670.8123658049573; Fri, 12 Jun 2020 01:58:19 -0700 (PDT) Received: from localhost ([::1]:45128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfVy-0003Fq-7q for importer@patchew.org; Fri, 12 Jun 2020 04:58:18 -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 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 Received: by mail-wr1-f69.google.com with SMTP id m14so3643282wrj.12 for ; Fri, 12 Jun 2020 01:55:32 -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) 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= X-MC-Unique: snoDi3QrOqS8XAUIdZvv-Q-1 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) From: =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Reviewed-by: Stefan Berger --- 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 flag= s) */ 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"); =20 /* * 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 =3D TPM_TIS_STATE_COMPLETION; s->rw_offset =3D 0; =20 - 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"); =20 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; =20 + if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER)) { + return; + } len =3D MIN(tpm_cmd_get_size(buffer), buffer_size); =20 /* --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952434; cv=none; d=zohomail.com; s=zohoarc; b=BCfegVsCePCuu00n4dt1v0QsRNuKjbzU8fCk1kveFYphS9us5bnTjiIOASzj+YTUk4ec64HV0T4Efz6Btd4jFfSijGpXpxsG8o0kiHjPJZtW3mbvdvSTKve2jYcJxWpZ3k8HWxsHyQlcv8ZKTYp9YRmfZA8uU2FmX4qpbR5fIcA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952434; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xQSuJDxId+eIi5LOLR+uHKFmqgbML9RlTNVSEbvu1dk=; b=XCKJNNNnTSDlZIFPodMY87pCla83aw+2yIurV9xxz6dezGbRsPYijeAKlff+k5KQE9GJOWW91IMYP/I9OiuGgf2Qlaf5RFqqQ/PVjJPCkF0w/Zcu0bWw1c9Zg2rISs4ia2dvm1Qlescu2C2YF5uOIhgERe80qsapDA9izHyClSM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952434178110.16425991972551; Fri, 12 Jun 2020 02:00:34 -0700 (PDT) Received: from localhost ([::1]:53180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfY8-00071I-FR for importer@patchew.org; Fri, 12 Jun 2020 05:00:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfTT-0006MW-PH for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:43 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:27927 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 1jjfTS-00076O-0l for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:55:43 -0400 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-382-0HI01v0oNg-y11k9Xj4Osg-1; Fri, 12 Jun 2020 04:55:37 -0400 Received: by mail-wm1-f71.google.com with SMTP id x6so2182647wmj.9 for ; Fri, 12 Jun 2020 01:55:37 -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 u4sm7884553wmb.48.2020.06.12.01.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952141; 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=bvWP59+278/GWLf0uNITSLacCpJLmMSN7SrolIrL2+EbsvlttA8mSzXWs07haBKdfNkkKz lHEV31FoEm/amvv7yXWiVEg/tbn9OGej8AcPtnJv0tuW6BIJ9J58UtnpwJXwRGpFc8LPiQ DJK+BwjyzifLtPEkA1Synxw+wga1ZN0= X-MC-Unique: 0HI01v0oNg-y11k9Xj4Osg-1 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=YQAVhk7SGGtbMot+96NuE8T0gdeD3oXEj4jmDEDnFZpmxhlykaGh3mI26CPrNEXhaB sdli8JC9/Z6svqxJNZvGw+80AbO+k40KfVsGuSXzI/nymjy41zuNVYI9+P6SVnMnE/ox XBV5RXezznVSmzEec7yvUl6qxX6YjwsK1W9V5QVhIWzuqu5k/oKlolqMu7TyFeB3oD8L jxZTwR2qrCklUfzspglRyVX88I9CFNoWiN15/Wd3f5tWskBFzPFSw2OwQDTTB4KCvN2u RL7zpIAR6QeXQuOm4pV6oadS19ZK/PNqBPLZWFBZAVHfMAfi8UcKyybIOM200yPQnub2 toog== X-Gm-Message-State: AOAM530rYl0m1FFBN9bGFWAZalcn3AgVvi7PCgHU/tWyJOYQnQetzR44 2ASevXcPrwTY/M1G2lCRnbF5K9VS/u09zTcqlhlZc/6W5E3viAY4zAWRXhOSmJRK1SMbfuvRfi5 ea1RB/szum1RNnRo= X-Received: by 2002:adf:f00f:: with SMTP id j15mr15105647wro.347.1591952136393; Fri, 12 Jun 2020 01:55:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0koS0O2CBjC9J+TcH/9SGUfEVt1ww4f3HZozyMPBi92HOtl79JJyd4M8OzFgBYTHsKy/3Ug== X-Received: by 2002:adf:f00f:: with SMTP id j15mr15105625wro.347.1591952136214; Fri, 12 Jun 2020 01:55:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 09/12] hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h' Date: Fri, 12 Jun 2020 10:54:41 +0200 Message-Id: <20200612085444.8362-10-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 --- 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 =20 #include "qemu/option.h" +#include "sysemu/tpm.h" =20 #define TPM_STANDARD_CMDLINE_OPTS \ { \ @@ -74,4 +75,14 @@ struct tpm_resp_hdr { #define TPM_RC_FAILURE 0x101 #define TPM_RC_LOCALITY 0x907 =20 +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 e= rror) stl_be_p(b + 6, error); } =20 -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 *) =20 -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); =20 --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952564; cv=none; d=zohomail.com; s=zohoarc; b=OPNgipClBWobVJUjKOkTGaRtMilggpfmPbZf0sC+aUc+PGDYjcycqh2wGVu37S5451D1aA1jGf2SDGk5alArTckrHmeUndwhwq7/CCiK7ymz+xC3JIwp5uSZJDxjayZa9QiFvPBu/T285P9WzsYJXWzAX0xzCSaZi9u1VNwi2Bo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952564; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OEBGBSENtvQqVBtd9DaoSVHe6pzGLtI0FdTlX7YOxdE=; b=lH2cQGnGndfk5xrLa5f3hjtAIkAAv1qgiSk/R0n0vCsPXQ+l0c/TE+TWSD/MiHvPVeyqGouglMmcy+kHqz9UJ+HDBjSM+uPtnoj726LVPSv1M2WbC3hAM6D2+inEOylcrfncCYbkVo/5G0Q0lffRO49XtJh8vvJ0AtsaljgYN0o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159195256468463.70017245314693; Fri, 12 Jun 2020 02:02:44 -0700 (PDT) Received: from localhost ([::1]:56200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfaF-0000Pq-Bh for importer@patchew.org; Fri, 12 Jun 2020 05:02:43 -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 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 Received: by mail-wm1-f70.google.com with SMTP id k185so1678534wme.8 for ; Fri, 12 Jun 2020 01:55:42 -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) 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= X-MC-Unique: wtbmc-rDP0-Eh2Ueu71NKQ-1 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) From: =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 --- 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 er= ror) stl_be_p(b + 6, error); } =20 -#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); =20 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 @@ =20 #include "sysemu/tpm_backend.h" #include "tpm_util.h" +#include "tpm_prop.h" =20 #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" =20 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" =20 --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952634; cv=none; d=zohomail.com; s=zohoarc; b=nOL+He5ix3Eh5nvR2cjug52tf25oOTPLbBc0sisJemTw0utYTjpXrdo3q9xQ/AloGEyUmGiaUxJEZgC4waeBVwVyGz55ez4tqjNd85WCn1aFuwQ/jTb4AfwjQSH+17JgYzVhzmLqVVaJ1MPpzeUiNi7ltQWE92H7fRrB4IrjOgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952634; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kgH8nCluDpl2P0gq4wKs7A/1SKsUvPl7A42U958qeTQ=; b=NW/YAnSjPfjeLrIfBPWL5wP+tNk0Bp7oqhTYfVwlxxbkIUdNIJzCvYWBcHJBb2XZgl3oQHELrFR07K2hmZJTwYNSYgI9BJVQ12TgJfF92qHXh/2p+1zbeK/vqkTD33mydkkbaaWXQ/NVaRiK9HZTRdNvMwlAiUVpzDfP6YnSZmc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952634418145.8501364768797; Fri, 12 Jun 2020 02:03:54 -0700 (PDT) Received: from localhost ([::1]:59614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfbN-0001py-4R for importer@patchew.org; Fri, 12 Jun 2020 05:03:53 -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 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 Received: by mail-wm1-f70.google.com with SMTP id c4so2185602wmd.0 for ; Fri, 12 Jun 2020 01:55:49 -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) 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= X-MC-Unique: Q8eF7a9pORisllNZxAGA-A-1 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) From: =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 --- docs/specs/tpm.rst | 4 ++-- {hw/tpm =3D> 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 =3D> 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`` =20 =20 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`` =20 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 */ =20 -#ifndef TPM_TPM_UTIL_H -#define TPM_TPM_UTIL_H +#ifndef SYSEMU_TPM_UTIL_H +#define SYSEMU_TPM_UTIL_H =20 #include "sysemu/tpm.h" #include "qemu/bswap.h" @@ -69,4 +69,4 @@ static inline void tpm_cmd_set_error(void *b, uint32_t er= ror) void tpm_util_show_buffer(const unsigned char *buffer, size_t buffer_size, const char *string); =20 -#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" =20 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" =20 #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" =20 #include "sysemu/tpm_backend.h" -#include "tpm_util.h" +#include "sysemu/tpm_util.h" #include "tpm_prop.h" =20 #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" =20 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" =20 /* tpm backend property */ --=20 2.21.3 From nobody Sun Feb 8 22:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591952707; cv=none; d=zohomail.com; s=zohoarc; b=AFvmf/wlyEv0cMBUFtc9Rsj+NGitQ57+jBv8Tp7IqnG0qCxsvPOhottXcZkauKsx2FI8O/W8orYsq5SZebIPEmQQ/yWlqTn9+qKCSJx+BB3wPenNZ7ChpIXk2dDA9pWR6+d2nXrx078eLQTrQoieQUYcDJlYxqXyeuN7GLRQv5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591952707; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=d7CIysZD1OBUeA3YX2r2swVtVwPy1qac/ud5dumb4Y0=; b=BfPzupbSi5dwK+QQeH12ln+tTolsuxyGUSisWTF16BHB0pcOCfz1Buh5JsuC1JkkXq/yjeuf+KswAPSWau1iCgDJge0tMLj/mJooG3Rf4X/whw8t+r76saso0nLGiXqpN04w1vOXUncmUUCLbPlxTz/1UcCwAidSSw8hQ1CS4Fk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591952707302503.50489911259365; Fri, 12 Jun 2020 02:05:07 -0700 (PDT) Received: from localhost ([::1]:33530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjfcX-0003kD-UW for importer@patchew.org; Fri, 12 Jun 2020 05:05:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjfTk-00077f-Kb for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:56:00 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:58150 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 1jjfTi-0007DM-BH for qemu-devel@nongnu.org; Fri, 12 Jun 2020 04:56:00 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248--jYKQ1kqMKuZfAqM6ESF5g-1; Fri, 12 Jun 2020 04:55:54 -0400 Received: by mail-wr1-f70.google.com with SMTP id l1so3643451wrc.8 for ; Fri, 12 Jun 2020 01:55:54 -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 d2sm9320318wrs.95.2020.06.12.01.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 01:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591952157; 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=d7CIysZD1OBUeA3YX2r2swVtVwPy1qac/ud5dumb4Y0=; b=Aqyvy2T8Qp5jnDCmLgWahDvs8C3V1z5XBZzsqSulgLaRwX5Z5Brru4geNpAEaEfTiIRtqw e3XJ5dMls8PKW/MA6mBMhjVkPBN5L3hKgczY3AjdLcTZ2sLIPZ2MfE14V5ISctfK2hjQfp mFqgwRkURtThGmWsS8LAZ+6c/r1a3cE= X-MC-Unique: -jYKQ1kqMKuZfAqM6ESF5g-1 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=d7CIysZD1OBUeA3YX2r2swVtVwPy1qac/ud5dumb4Y0=; b=oGryv+PUAI/REdr+8kGwAIprd0q7D+6BHXdcbwGD2ptjIlgUUFR/RhLzfnn+Bfa3kH 2ir+e7qpaeYgRKhmpijK2U4kjgTU2PM598VkYb3RJ3Ao4RiCrZWQMxvK7iRscwUQ5OsJ 7C5krZdi6yE9ACAJGnfBfCbre/Hz2nNM8sQ7mYId4I88S5YkRDQbrRvMRtPi/twXCxcd G7wcgMwR04Vh2QVRSX87innfnaJSAb0frWPbzmaR1AZih1VEWolYZduMPnqTEe4KmyeB uGQ3R41YGYizX4WWx9YgW1WlF0TVOd1cuR956PKpgtOlakk1AtcdEVhlrH1a8hcbyVUr 0Qgw== X-Gm-Message-State: AOAM531yFJaAx9UNNARjZQEy5aTmLIRDIacmM3RNLF6jLPbSud1rUw9I fGCl4YskmX0C+BQbEdD57STbBBlCq3Yapk8NfNW2M/5JcBLoXK48LnMLOrU7br+7qNSJsvo9O/I YKIpRRrkPyAYWODY= X-Received: by 2002:a1c:4d0c:: with SMTP id o12mr12600961wmh.181.1591952152661; Fri, 12 Jun 2020 01:55:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAumwuPx3HncrxBbxIh6ZLCTU1dGbxHYvMTBhOtLmlKaQsVUpTqx8gjAtVWGAJjnY16GjAnQ== X-Received: by 2002:a1c:4d0c:: with SMTP id o12mr12600924wmh.181.1591952152167; Fri, 12 Jun 2020 01:55:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 12/12] tpm: Move backend code under the 'backends/' directory Date: Fri, 12 Jun 2020 10:54:44 +0200 Message-Id: <20200612085444.8362-13-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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Lureau?= , Paolo Bonzini , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) TPM subsytem is split into backends (see commit f4ede81eed2) and frontends (see i.e. 3676bc69b35). Keep the emulated hardware 'frontends' under hw/tpm/, but move the backends in the backends/tpm/ directory. Suggested-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- docs/specs/tpm.rst | 8 +++--- Makefile | 2 +- Makefile.objs | 1 + {hw =3D> backends}/tpm/tpm_int.h | 6 ++--- {hw =3D> backends}/tpm/tpm_ioctl.h | 0 {hw =3D> backends}/tpm/tpm_emulator.c | 0 {hw =3D> backends}/tpm/tpm_passthrough.c | 0 {hw =3D> backends}/tpm/tpm_util.c | 0 tests/qtest/tpm-emu.c | 2 +- backends/Kconfig | 1 + backends/tpm/Kconfig | 14 +++++++++++ backends/tpm/Makefile.objs | 3 +++ backends/tpm/trace-events | 33 +++++++++++++++++++++++++ hw/tpm/Kconfig | 15 ------------ hw/tpm/Makefile.objs | 3 --- hw/tpm/trace-events | 34 +------------------------- 16 files changed, 62 insertions(+), 60 deletions(-) rename {hw =3D> backends}/tpm/tpm_int.h (96%) rename {hw =3D> backends}/tpm/tpm_ioctl.h (100%) rename {hw =3D> backends}/tpm/tpm_emulator.c (100%) rename {hw =3D> backends}/tpm/tpm_passthrough.c (100%) rename {hw =3D> backends}/tpm/tpm_util.c (100%) create mode 100644 backends/Kconfig create mode 100644 backends/tpm/Kconfig create mode 100644 backends/tpm/trace-events diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst index 0200fdac68..ed6c0d785d 100644 --- a/docs/specs/tpm.rst +++ b/docs/specs/tpm.rst @@ -232,8 +232,8 @@ Integrity Measurement Architecture (IMA), are not expec= ting to share PCRs. =20 QEMU files related to the TPM passthrough device: - - ``hw/tpm/tpm_passthrough.c`` - - ``hw/tpm/tpm_util.c`` + - ``backends/tpm/tpm_passthrough.c`` + - ``backends/tpm/tpm_util.c`` - ``include/sysemu/tpm_util.h`` =20 =20 @@ -292,8 +292,8 @@ instrumented to initialize a TPM 1.2 or TPM 2 device us= ing this command. =20 QEMU files related to the TPM emulator device: - - ``hw/tpm/tpm_emulator.c`` - - ``hw/tpm/tpm_util.c`` + - ``backends/tpm/tpm_emulator.c`` + - ``backends/tpm/tpm_util.c`` - ``include/sysemu/tpm_util.h`` =20 The following commands start the swtpm with a UnixIO control channel over diff --git a/Makefile b/Makefile index d1af126ea1..0ab6e12dd6 100644 --- a/Makefile +++ b/Makefile @@ -418,7 +418,7 @@ MINIKCONF_ARGS =3D \ CONFIG_LINUX=3D$(CONFIG_LINUX) \ CONFIG_PVRDMA=3D$(CONFIG_PVRDMA) =20 -MINIKCONF_INPUTS =3D $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig +MINIKCONF_INPUTS =3D $(SRC_PATH)/Kconfig.host $(SRC_PATH)/backends/Kconfig= $(SRC_PATH)/hw/Kconfig MINIKCONF_DEPS =3D $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig) MINIKCONF =3D $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \ =20 diff --git a/Makefile.objs b/Makefile.objs index 99774cfd25..84fc651f53 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -125,6 +125,7 @@ trace-events-subdirs =3D trace-events-subdirs +=3D accel/kvm trace-events-subdirs +=3D accel/tcg trace-events-subdirs +=3D backends +trace-events-subdirs +=3D backends/tpm trace-events-subdirs +=3D crypto trace-events-subdirs +=3D monitor ifeq ($(CONFIG_USER_ONLY),y) diff --git a/hw/tpm/tpm_int.h b/backends/tpm/tpm_int.h similarity index 96% rename from hw/tpm/tpm_int.h rename to backends/tpm/tpm_int.h index 9f72879d89..ba6109306e 100644 --- a/hw/tpm/tpm_int.h +++ b/backends/tpm/tpm_int.h @@ -9,8 +9,8 @@ * 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. */ -#ifndef TPM_TPM_INT_H -#define TPM_TPM_INT_H +#ifndef BACKENDS_TPM_INT_H +#define BACKENDS_TPM_INT_H =20 #include "qemu/option.h" #include "sysemu/tpm.h" @@ -85,4 +85,4 @@ typedef struct TPMSizedBuffer { =20 void tpm_sized_buffer_reset(TPMSizedBuffer *tsb); =20 -#endif /* TPM_TPM_INT_H */ +#endif /* BACKENDS_TPM_INT_H */ diff --git a/hw/tpm/tpm_ioctl.h b/backends/tpm/tpm_ioctl.h similarity index 100% rename from hw/tpm/tpm_ioctl.h rename to backends/tpm/tpm_ioctl.h diff --git a/hw/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c similarity index 100% rename from hw/tpm/tpm_emulator.c rename to backends/tpm/tpm_emulator.c diff --git a/hw/tpm/tpm_passthrough.c b/backends/tpm/tpm_passthrough.c similarity index 100% rename from hw/tpm/tpm_passthrough.c rename to backends/tpm/tpm_passthrough.c diff --git a/hw/tpm/tpm_util.c b/backends/tpm/tpm_util.c similarity index 100% rename from hw/tpm/tpm_util.c rename to backends/tpm/tpm_util.c diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c index c43ac4aef8..337647846f 100644 --- a/tests/qtest/tpm-emu.c +++ b/tests/qtest/tpm-emu.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include =20 -#include "hw/tpm/tpm_ioctl.h" +#include "backends/tpm/tpm_ioctl.h" #include "io/channel-socket.h" #include "qapi/error.h" #include "tpm-emu.h" diff --git a/backends/Kconfig b/backends/Kconfig new file mode 100644 index 0000000000..f35abc1609 --- /dev/null +++ b/backends/Kconfig @@ -0,0 +1 @@ +source tpm/Kconfig diff --git a/backends/tpm/Kconfig b/backends/tpm/Kconfig new file mode 100644 index 0000000000..5d91eb89c2 --- /dev/null +++ b/backends/tpm/Kconfig @@ -0,0 +1,14 @@ +config TPM_BACKEND + bool + depends on TPM + +config TPM_PASSTHROUGH + bool + default y + # FIXME: should check for x86 host as well + depends on TPM_BACKEND && LINUX + +config TPM_EMULATOR + bool + default y + depends on TPM_BACKEND diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs index 8cf5772824..db2731f634 100644 --- a/backends/tpm/Makefile.objs +++ b/backends/tpm/Makefile.objs @@ -1 +1,4 @@ common-obj-y +=3D tpm_backend.o +common-obj-y +=3D tpm_util.o +common-obj-$(CONFIG_TPM_PASSTHROUGH) +=3D tpm_passthrough.o +common-obj-$(CONFIG_TPM_EMULATOR) +=3D tpm_emulator.o diff --git a/backends/tpm/trace-events b/backends/tpm/trace-events new file mode 100644 index 0000000000..0a2591fb2d --- /dev/null +++ b/backends/tpm/trace-events @@ -0,0 +1,33 @@ +# See docs/devel/tracing.txt for syntax documentation. + +# tpm_passthrough.c +tpm_passthrough_handle_request(void *cmd) "processing command %p" +tpm_passthrough_reset(void) "reset" + +# tpm_util.c +tpm_util_get_buffer_size_hdr_len(uint32_t len, size_t expected) "tpm_resp-= >hdr.len =3D %u, expected =3D %zu" +tpm_util_get_buffer_size_len(uint32_t len, size_t expected) "tpm_resp->len= =3D %u, expected =3D %zu" +tpm_util_get_buffer_size_hdr_len2(uint32_t len, size_t expected) "tpm2_res= p->hdr.len =3D %u, expected =3D %zu" +tpm_util_get_buffer_size_len2(uint32_t len, size_t expected) "tpm2_resp->l= en =3D %u, expected =3D %zu" +tpm_util_get_buffer_size(size_t len) "buffersize of device: %zu" +tpm_util_show_buffer(const char *direction, size_t len, const char *buf) "= direction: %s len: %zu\n%s" + +# tpm_emulator.c +tpm_emulator_set_locality(uint8_t locty) "setting locality to %d" +tpm_emulator_handle_request(void) "processing TPM command" +tpm_emulator_probe_caps(uint64_t caps) "capabilities: 0x%"PRIx64 +tpm_emulator_set_buffer_size(uint32_t buffersize, uint32_t minsize, uint32= _t maxsize) "buffer size: %u, min: %u, max: %u" +tpm_emulator_startup_tpm_resume(bool is_resume, size_t buffersize) "is_res= ume: %d, buffer size: %zu" +tpm_emulator_get_tpm_established_flag(uint8_t flag) "got established flag:= %d" +tpm_emulator_cancel_cmd_not_supt(void) "Backend does not support CANCEL_TP= M_CMD" +tpm_emulator_handle_device_opts_tpm12(void) "TPM Version 1.2" +tpm_emulator_handle_device_opts_tpm2(void) "TPM Version 2" +tpm_emulator_handle_device_opts_unspec(void) "TPM Version Unspecified" +tpm_emulator_handle_device_opts_startup_error(void) "Startup error" +tpm_emulator_get_state_blob(uint8_t type, uint32_t size, uint32_t flags) "= got state blob type %d, %u bytes, flags 0x%08x" +tpm_emulator_set_state_blob(uint8_t type, uint32_t size, uint32_t flags) "= set state blob type %d, %u bytes, flags 0x%08x" +tpm_emulator_set_state_blobs(void) "setting state blobs" +tpm_emulator_set_state_blobs_error(const char *msg) "error while setting s= tate blobs: %s" +tpm_emulator_set_state_blobs_done(void) "Done setting state blobs" +tpm_emulator_pre_save(void) "" +tpm_emulator_inst_init(void) "" diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig index 5028fd8880..29e82f3c92 100644 --- a/hw/tpm/Kconfig +++ b/hw/tpm/Kconfig @@ -1,7 +1,3 @@ -config TPM_BACKEND - bool - depends on TPM - config TPM_TIS_ISA bool depends on TPM && ISA_BUS @@ -22,17 +18,6 @@ config TPM_CRB depends on TPM && PC select TPM_BACKEND =20 -config TPM_PASSTHROUGH - bool - default y - # FIXME: should check for x86 host as well - depends on TPM_BACKEND && LINUX - -config TPM_EMULATOR - bool - default y - depends on TPM_BACKEND - config TPM_SPAPR bool default y diff --git a/hw/tpm/Makefile.objs b/hw/tpm/Makefile.objs index f1ec4beb95..6fc05be67c 100644 --- a/hw/tpm/Makefile.objs +++ b/hw/tpm/Makefile.objs @@ -1,9 +1,6 @@ -common-obj-$(CONFIG_TPM) +=3D tpm_util.o obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) +=3D tpm_ppi.o common-obj-$(CONFIG_TPM_TIS_ISA) +=3D tpm_tis_isa.o common-obj-$(CONFIG_TPM_TIS_SYSBUS) +=3D tpm_tis_sysbus.o common-obj-$(CONFIG_TPM_TIS) +=3D tpm_tis_common.o common-obj-$(CONFIG_TPM_CRB) +=3D tpm_crb.o -common-obj-$(CONFIG_TPM_PASSTHROUGH) +=3D tpm_passthrough.o -common-obj-$(CONFIG_TPM_EMULATOR) +=3D tpm_emulator.o obj-$(CONFIG_TPM_SPAPR) +=3D tpm_spapr.o diff --git a/hw/tpm/trace-events b/hw/tpm/trace-events index 439e514787..de9bf1e01b 100644 --- a/hw/tpm/trace-events +++ b/hw/tpm/trace-events @@ -4,38 +4,6 @@ tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 0x= %016" PRIx64 " len:%u val: 0x%" PRIx32 tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB write = 0x%016" PRIx64 " len:%u val: 0x%" PRIx32 =20 -# tpm_passthrough.c -tpm_passthrough_handle_request(void *cmd) "processing command %p" -tpm_passthrough_reset(void) "reset" - -# tpm_util.c -tpm_util_get_buffer_size_hdr_len(uint32_t len, size_t expected) "tpm_resp-= >hdr.len =3D %u, expected =3D %zu" -tpm_util_get_buffer_size_len(uint32_t len, size_t expected) "tpm_resp->len= =3D %u, expected =3D %zu" -tpm_util_get_buffer_size_hdr_len2(uint32_t len, size_t expected) "tpm2_res= p->hdr.len =3D %u, expected =3D %zu" -tpm_util_get_buffer_size_len2(uint32_t len, size_t expected) "tpm2_resp->l= en =3D %u, expected =3D %zu" -tpm_util_get_buffer_size(size_t len) "buffersize of device: %zu" -tpm_util_show_buffer(const char *direction, size_t len, const char *buf) "= direction: %s len: %zu\n%s" - -# tpm_emulator.c -tpm_emulator_set_locality(uint8_t locty) "setting locality to %d" -tpm_emulator_handle_request(void) "processing TPM command" -tpm_emulator_probe_caps(uint64_t caps) "capabilities: 0x%"PRIx64 -tpm_emulator_set_buffer_size(uint32_t buffersize, uint32_t minsize, uint32= _t maxsize) "buffer size: %u, min: %u, max: %u" -tpm_emulator_startup_tpm_resume(bool is_resume, size_t buffersize) "is_res= ume: %d, buffer size: %zu" -tpm_emulator_get_tpm_established_flag(uint8_t flag) "got established flag:= %d" -tpm_emulator_cancel_cmd_not_supt(void) "Backend does not support CANCEL_TP= M_CMD" -tpm_emulator_handle_device_opts_tpm12(void) "TPM Version 1.2" -tpm_emulator_handle_device_opts_tpm2(void) "TPM Version 2" -tpm_emulator_handle_device_opts_unspec(void) "TPM Version Unspecified" -tpm_emulator_handle_device_opts_startup_error(void) "Startup error" -tpm_emulator_get_state_blob(uint8_t type, uint32_t size, uint32_t flags) "= got state blob type %d, %u bytes, flags 0x%08x" -tpm_emulator_set_state_blob(uint8_t type, uint32_t size, uint32_t flags) "= set state blob type %d, %u bytes, flags 0x%08x" -tpm_emulator_set_state_blobs(void) "setting state blobs" -tpm_emulator_set_state_blobs_error(const char *msg) "error while setting s= tate blobs: %s" -tpm_emulator_set_state_blobs_done(void) "Done setting state blobs" -tpm_emulator_pre_save(void) "" -tpm_emulator_inst_init(void) "" - # tpm_tis.c tpm_tis_raise_irq(uint32_t irqmask) "Raising IRQ for flag 0x%08x" tpm_tis_new_active_locality(uint8_t locty) "Active locality is now %d" @@ -56,7 +24,7 @@ tpm_tis_pre_save(uint8_t locty, uint32_t rw_offset) "loct= y: %d, rw_offset =3D %u" # tpm_ppi.c tpm_ppi_memset(uint8_t *ptr, size_t size) "memset: %p %zu" =20 -# hw/tpm/tpm_spapr.c +# tpm_spapr.c tpm_spapr_show_buffer(const char *direction, size_t len, const char *buf) = "direction: %s len: %zu\n%s" tpm_spapr_do_crq(uint8_t raw1, uint8_t raw2) "1st 2 bytes in CRQ: 0x%02x 0= x%02x" tpm_spapr_do_crq_crq_result(void) "SPAPR_VTPM_INIT_CRQ_RESULT" --=20 2.21.3