From nobody Sun Feb 8 22:08:01 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=1591819617; cv=none; d=zohomail.com; s=zohoarc; b=Kqq3vLGXTdFJf8xlI3a1KXocITz8B94HiIxxaCDHLPgWtQYrFzxBLhWf6YfhA2z2j9m15VwAdNR0QbXX9fv59TQBZDAbZxnqaXdVV9GrikWIeEikyfYN6zTppMDgy60LEDr4Wf3rbrcCUxh9TpojhL6jDIBIOIgoxioqIPRldFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819617; 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=CWMg4HObNcb0F4Bp7X8vxMJGRNjGiyU+9e6+l42zIY8=; b=YdyUv2q5lomd5pKNLxkvcR+tXIoxGWzMczwe6BimiAyNFXsKaV2LGsHz36ckxo7mEaDsh5ybp0t+9F5dqzXgm0DaH/Ox+a1J4Ix3nU61qfsv0d52J4nwjgbrZW55n+7AfE33zGe+Xliv1Zz+mfxWVdifFnoqqME8alLpzy6Oz+w= 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 1591819617314491.0536881939738; Wed, 10 Jun 2020 13:06:57 -0700 (PDT) Received: from localhost ([::1]:52516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj6zw-0007sT-0m for importer@patchew.org; Wed, 10 Jun 2020 16:06:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wA-0003Wn-6R for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:02 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:47572 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 1jj6w9-0000Pi-CT for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:01 -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-129-KzK_5o-uMiylgxDyNja49Q-1; Wed, 10 Jun 2020 16:02:56 -0400 Received: by mail-wr1-f70.google.com with SMTP id t5so1520028wro.20 for ; Wed, 10 Jun 2020 13:02:56 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id y37sm1374085wrd.55.2020.06.10.13.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819380; 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=CWMg4HObNcb0F4Bp7X8vxMJGRNjGiyU+9e6+l42zIY8=; b=BrvhnCraMyqORx51fxLGQlJzf12A1vB3nTHk6zbChHJ226kH8zOiw6GGVs3AIXgAjrl1Bj NHy/9J6TdYVi6q/9PxuOMPUb3Cr+CZdkgZtaAMU9Yh5VIm1+F+U6Sg21XNMH2+iJ2p5XIT jFAAyDU79UPi/HqsaJ3jIq8k2XNJiR4= X-MC-Unique: KzK_5o-uMiylgxDyNja49Q-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=CWMg4HObNcb0F4Bp7X8vxMJGRNjGiyU+9e6+l42zIY8=; b=S6GYHvwE56jklZhprw+h9TCnuehcWDr8IN0QmsruAbusgp1C79YT1UF3YoqE0U+W4V WULiDis5iwVNYHS9Kc2oUbjQDnHpQvNv7glRbLa9an1yZiIRIXQAGhfeGpUEWb8x6bGZ t8MEk6rTH8NDLK8zEhtWr2HMsA/KdqLf1xo7Vu3o0aUB80JuOKTmrmkSccaCZYYcU2du OR1HdVknCvv80HT2NmN6kJ3Qg1cmDCMf7ar0+17j6vByHhiY5lfJpfwENeYgy0PlFYY4 P2NBnA4nz93OnbvU5kk9IV/SVHOkKZcN6eWrVl7uUSvy2+zLnoYslm+s98UDGn61Jq8U ZTwQ== X-Gm-Message-State: AOAM532OjdyxjTD+c3yskdF1R7cfKuAevOoUJmA80/a3b/3pCA5KJ5WS H+y9H2ZWYDT3npaDmZPEcfgpw03PquOfkDZbC5H+gvbttWZppJIx1AIrmVt7382fNCeFpbTRBO7 hijOQUNLQvA6puDI= X-Received: by 2002:a7b:cf35:: with SMTP id m21mr4852523wmg.181.1591819375001; Wed, 10 Jun 2020 13:02:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbyBtjI06ZTZmHCDEOnaR8fSzAPzaAsMJoMvVWxwNDyMzuiKaxX3D6unz34ccmr1ssKmbjoA== X-Received: by 2002:a7b:cf35:: with SMTP id m21mr4852505wmg.181.1591819374813; Wed, 10 Jun 2020 13:02:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/8] hw/tpm: Do not include 'qemu/osdep.h' in header Date: Wed, 10 Jun 2020 22:02:40 +0200 Message-Id: <20200610200247.21378-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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/10 15:37:41 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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- 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:08:01 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=1591819704; cv=none; d=zohomail.com; s=zohoarc; b=f2ILz2bxTV710r9jI1JqLbMCU7SewVikEd35Int8e3rMS/7qehiCmOGjCo7YbVW1BQ9Kf5oZ8EIRbsXu/EnZirn1WJuyZm7+74gCOIiGg7PzDl3+SR84grf/mJ7L2/ALhlQJJO8wPcuTMJnGbZ3UMYwCD0yeALg3Thfx0jvHOD8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819704; 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=A5d2BJjR7XQMBkEPqaKVThDr/OlFUq8OgKxiYSdRo8o=; b=i3p+/+G2kI0RZv7StN/SMBJMLbmynsAba1NlvQgbareu0QnnOiQk3nlClYbPTXa5F9ImcgHeQuZob0sFZAFUJEbRTDdUsNQxKCcg77t6oKyC6VavsYgiP+dreiKYXVRLPOPRf6d/v4eMaNUVctgxhzYT0gLoLUe9m/WL7ESegfw= 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 1591819704842286.54445828667724; Wed, 10 Jun 2020 13:08:24 -0700 (PDT) Received: from localhost ([::1]:58228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj71L-0001rU-K9 for importer@patchew.org; Wed, 10 Jun 2020 16:08:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wE-0003d0-Gy for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:07 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:34867 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 1jj6wD-0000Q9-Kz for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:06 -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-324-7i2wYelmOYiLa3YKuBETpQ-1; Wed, 10 Jun 2020 16:03:02 -0400 Received: by mail-wm1-f70.google.com with SMTP id j128so733974wmj.6 for ; Wed, 10 Jun 2020 13:03:02 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id g187sm944660wma.17.2020.06.10.13.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819384; 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=A5d2BJjR7XQMBkEPqaKVThDr/OlFUq8OgKxiYSdRo8o=; b=LrXcNAF4NqKURfxb1uEkW6avPru3kwQkDj9ozvOXpU+QRV9KGFTjM42ZiNOgKEwFBQJ2fQ KOOpGsOZofimzc8CHnADeVluwXFBjBaavNTGuAOwvHLY+Z8/0iTNVWKwVG8Zz7FN515YFj o2BAlnArlR0wCWLJLVCUZENH1fyHclc= X-MC-Unique: 7i2wYelmOYiLa3YKuBETpQ-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=A5d2BJjR7XQMBkEPqaKVThDr/OlFUq8OgKxiYSdRo8o=; b=tGjXa5+FZAvqQvn14SeMrem/NKvooA4nwdIpCvOX4QKUWiTWr+vreEc1/LtnQNGTXz ErAc8qNgeyWK1QTd1Je8GvfoCuEwAUvvk2QRRx956vkAsaLRlbnMVX/eXZlthsKfcIPa W1ExJhw/doYxdCNw2zrrD+Wfzz1/6kpaX7vbe62Hh6Ukuy8En87W7f+uXyMpqCwhhaB0 gcGr8l0Gw5R0G1WURH5FmhNOoO8d5ErE+R2bbCenloNjuD6iGI7jixhjQ1bDB60Ka0lK EHADC7nqU0/Q50QLIDzFErpVDZKWmN11c3AvL85NvwJcufI3MtCX5zCpVfbGxMhPGv4b QHXg== X-Gm-Message-State: AOAM532k1kn1a6/Wg0X4Hu+JOr7D++ljQ6M9nLlb7V227ry0/llYbwUN h5Fy5lhyE5Gx9ixVaPw0J94hOno3gDE1cjbXML21iStY/BfzEIWi0zVH25RwRpsKBKcWGbsKxN1 LlQXP8icn9zN3iWU= X-Received: by 2002:adf:8b47:: with SMTP id v7mr5254552wra.238.1591819380913; Wed, 10 Jun 2020 13:03:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcKxB2Gf7GrNx5VqvH6Ia4z2jrdVV4BApGKoNs5qrsCcsB1ftAsV91SH3Cg8/yq6KlxqDz0g== X-Received: by 2002:adf:8b47:: with SMTP id v7mr5254536wra.238.1591819380610; Wed, 10 Jun 2020 13:03:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/8] hw/tpm: Include missing 'qemu/option.h' header Date: Wed, 10 Jun 2020 22:02:41 +0200 Message-Id: <20200610200247.21378-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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/09 23:51:15 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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- 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:08:01 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=1591819835; cv=none; d=zohomail.com; s=zohoarc; b=PNF2B1pacW+NeWmZ9TnPR0lBavPlb1KxnHcagIaTF3OW7XZD3EfRDqiCS+AbE12B8QFgztjnJqsHKPLAPZHWmOCFJs60x9Xt7HYDKqBM19ChDbzJ5RCu2Di+HI9hShjUaXVu2mSdCi34kvy/+5s1AIXxJJ8au9wHk0ys1HdaCwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819835; 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=L8vcbVygnzll77AIdF+TXScFaEG2IAKPO5yj5yE5bD4=; b=RAeDIthmB2uy490mPk0lJCgT1xHytYTqyDOCUnDFatX5OWppikzQiaE/l3dBLFwAW9u7R1sETHC+yA3j0e2F+OVtbiBWAS0rxQzoNLUTL2W59BIaDiYd3AdptDb+rX50fCkIQ8CDgPHFezt77+dHaeNKvYkCd0itdOrmwUk0FZ8= 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 1591819835735374.6019578312505; Wed, 10 Jun 2020 13:10:35 -0700 (PDT) Received: from localhost ([::1]:36388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj73S-0004UX-CG for importer@patchew.org; Wed, 10 Jun 2020 16:10:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wK-0003iY-9J for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:12 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:35978 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 1jj6wJ-0000Tl-CU for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:11 -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-279-lnYVG0xGPFqTeGBT61zU_g-1; Wed, 10 Jun 2020 16:03:07 -0400 Received: by mail-wr1-f72.google.com with SMTP id n6so1539669wrv.6 for ; Wed, 10 Jun 2020 13:03:06 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id l17sm1230253wrq.17.2020.06.10.13.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819390; 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=L8vcbVygnzll77AIdF+TXScFaEG2IAKPO5yj5yE5bD4=; b=ImB/Pl7lagZjCVqO9FJXsdM245YhCFXwVZ3+R634bL15Vt661aioSX8QRffWREdKDSpGbN pJBmtBqgwxxCmXcJN3lHpKrSqYR565c9fFymhwMetF60cP6/4lDrhoS32RiumcYxe/bC8t KNzpSlf/lLXjbz76f43ReoU9NtF2w0s= X-MC-Unique: lnYVG0xGPFqTeGBT61zU_g-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=L8vcbVygnzll77AIdF+TXScFaEG2IAKPO5yj5yE5bD4=; b=gXMSEkRByMzMyLj8E4j+wJq/hC1Y645kvTa+4GwzL8HFohJ7ReUcOAYKjwbAfO11Iu 5BzGX3vZtglMCwm7hZYIe+26axSnfXEIGYRQ3KCMouBFFpswLp/nqnKTJzERqfm6zrpk EvKPJS+Kk+lumEGrU/5Gli6+RQb06GCQIBq2ZosQ+Fe7a1+mm8KD69dFU772so6daec4 a+sG3FzDzkPT5q7EE2FczLksIJ13n/R30ZmX+D6ABrnbV1wuNC77KOJKetxUoqPY9UH/ UEs9H8P02Agqxnvi5X0NUaXDz+05MEJUy/NHpUWH/XlO4sB9XzJIL8ky0B5CIVdvseZp DcFQ== X-Gm-Message-State: AOAM530G+cVM7UOldkhofwOWUJr5g76UxEGU+pfK5NPOCT+IlmUFWxmX PQcO3zIGTnNbSHtp/lKumeCSGFfFhX8BPPj/pBdBKQjh+b7UjgvN7WAeb3ICzPacDX2P0gQ7JoT w+BpsCNu92JcxTUE= X-Received: by 2002:a7b:c764:: with SMTP id x4mr4577367wmk.94.1591819385602; Wed, 10 Jun 2020 13:03:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb3l657YWc7tCE3RybZH3rQEL7JuWNOJgyiZ21SJfzDedPCZSViDPU6gnw7BV6RoIVDSYSIw== X-Received: by 2002:a7b:c764:: with SMTP id x4mr4577354wmk.94.1591819385399; Wed, 10 Jun 2020 13:03:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/8] hw/tpm: Move 'hw/acpi/tpm.h' inclusion from header to sources Date: Wed, 10 Jun 2020 22:02:42 +0200 Message-Id: <20200610200247.21378-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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/10 15:37:41 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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- hw/tpm/tpm_ppi.h | 1 - hw/tpm/tpm_tis_isa.c | 1 + hw/tpm/tpm_tis_sysbus.c | 1 + 3 files changed, 2 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_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:08:01 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=1591819515; cv=none; d=zohomail.com; s=zohoarc; b=jfX/JSVg/Hof9QlnwzA5ClB36RaXVPuO16KBIMKqE6xICjbNUGWnorwmWrb94drnAkN162bsnqRLXwFISloJpbT3oixUDJXqaXNsPDHa5zzh/6rbtVDal54djc9Tp+PRnYTi1A5P/3V8doZeCBMXz6VBm6Wv5KQIC5zdDzmUjeA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819515; 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=e/EYPVDSq9o7kGYyx2YtJypw5YHd6D2ZQpFJlgHmrng=; b=YBi3z49c1wI/fFGMbgV24g/oAqMwY+G2Gwe++NwNRkyi9+IxftKgOZDKDdRpkAozDPjlrTu3z9y6ScrvcylC6TovgxzWcbJ0LDYfTwRT23V+Eovxl3auLwBKB3GQj1HkYrTpNoWLJimU3hODZYiG+dHwHH9BgDdSy33+qwVzcn8= 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 1591819515657532.4385792822144; Wed, 10 Jun 2020 13:05:15 -0700 (PDT) Received: from localhost ([::1]:47154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj6yI-0005bQ-9t for importer@patchew.org; Wed, 10 Jun 2020 16:05:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wM-0003kn-W0 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:22443 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 1jj6wM-0000VG-68 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:14 -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-201-TwcsvPSgMsOmwQnaKJQz7Q-1; Wed, 10 Jun 2020 16:03:11 -0400 Received: by mail-wr1-f69.google.com with SMTP id i6so1520728wrr.23 for ; Wed, 10 Jun 2020 13:03:11 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id o10sm1219017wrq.40.2020.06.10.13.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819393; 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=e/EYPVDSq9o7kGYyx2YtJypw5YHd6D2ZQpFJlgHmrng=; b=V6mCcei9T1ahtv5v3BKvvxEh+qMNGHXj3iqJyfiD+7IS3zJ1wSWEeSkfQaFZhrExodQifw lXHbRSFxQSZrYScR1k0R7HSNmz8TZeQ7NmFx58n4EOBBcnEAK9CRW7XNleMJ3akXoU4Ee/ 8rbcv4wF8souoOMxuvdEg8DGalRIGXw= X-MC-Unique: TwcsvPSgMsOmwQnaKJQz7Q-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=e/EYPVDSq9o7kGYyx2YtJypw5YHd6D2ZQpFJlgHmrng=; b=L5Yx/Tet7SwgqDH4dXlTM8AYLI/ekZ9cBBlTNm2uK0LrzDJ9VepJIbCEg9lljPnRYM El14hGs4GMpt2mWpPBnXPkURs94E9vF8QZCjfiYK/i2v2dkpVpxjoOeoyPdsEC9gsgOH eFqiRgh7UkEfEVxJVb1Hp2J0UZpj9z2kHMDpK8KDHJFYfc2OpyW5F2tRu5i26XUFeY3q 4IgUn2i1m0nlT1LI0hlGLzuLBvaGmebxsNy3un6AvLgZr3QMcQP1lZiQBzSOCAe5xeBa M4gjzpqrkFLzRq//p3D5Pr76eMbw6Z6wKT2rpVOu+VLNDNQGXeZqKxx/lFq33MsRF2IN 6K+A== X-Gm-Message-State: AOAM530u016HndwLAQMw94t0OssPz1vdyu9zUDlCSgYVySvEkmAwD/7A w+k3ypbfjZJL1mCWxzZWG9x462nsXVoOwFoRmmWUf8J96Km1f6Rivt7PREq6RUvg9BgxGWF891o JrKMIW/LbaWXlVT4= X-Received: by 2002:adf:f512:: with SMTP id q18mr5947188wro.38.1591819390282; Wed, 10 Jun 2020 13:03:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvNmYO/WldNwwukngXC7JYTHy59oge5U+OTu+aPSbQql/XO4bcyXINRMJH9NRwrBX9Z9/UtA== X-Received: by 2002:adf:f512:: with SMTP id q18mr5947168wro.38.1591819390138; Wed, 10 Jun 2020 13:03:10 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/8] hw/tpm: Remove unnecessary 'tpm_int.h' header inclusion Date: Wed, 10 Jun 2020 22:02:43 +0200 Message-Id: <20200610200247.21378-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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/10 15:37:38 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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- 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:08:01 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=1591819639; cv=none; d=zohomail.com; s=zohoarc; b=gzqjiONmOnyNGZJ+2v/EkqlqVm6s0bPNX2q0cIC2BDPvXvT2DG4numHro+sOzM10kDF9D/p4hvZ0gjPSOtGX9ay0ofFZXwzy28vtk7TcQIbQ+m8zWddzN3Oo0Qui3W9WzI7kVnjtEnkwufoSd7in8jKM3Yi/2QSzSxVFoIw+0gU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819639; 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=yTmKvMxsRg6TDo1ZOS8kS+0m6cLpvXXwMo5jtOpsK98=; b=IhKXju2/r2i5dxr21zdDkuB2xDdtxaLbeW54/NhZt08MR+RR4mMV5BGaqzSjZppBTO4I91cYBAN0GHrGEG6QFYXGtfJEyBNJY31xgb4BTs/iZuOghnzuYUNhlBTRwwBGYLjwpGmEX4DJJvWhHTYvlHuIh6qyBoq0iQ0TKSfosNM= 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 1591819639865630.9735519078025; Wed, 10 Jun 2020 13:07:19 -0700 (PDT) Received: from localhost ([::1]:53694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj70I-0008Mu-LB for importer@patchew.org; Wed, 10 Jun 2020 16:07:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wR-0003sV-Lp for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:19 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:21989 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 1jj6wQ-0000VV-M4 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:19 -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-123-CaMsqCKSO-6uZ_yVAlsw2w-1; Wed, 10 Jun 2020 16:03:16 -0400 Received: by mail-wm1-f70.google.com with SMTP id p24so734912wmc.1 for ; Wed, 10 Jun 2020 13:03:16 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id o18sm996955wme.19.2020.06.10.13.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819397; 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=yTmKvMxsRg6TDo1ZOS8kS+0m6cLpvXXwMo5jtOpsK98=; b=D+dSUKJYke0YGJ406Em5EYdkEoMQj6FP/lVILKHgii8rjY8GNPHo+GnASTfPnWp9t/0FiB knvj3p9qrgnUIvwJDz+/wjFFtG85dJ6gw5W5eJI2MGMKNtlHgGvWJugBZzLR9V1U/NxnZN bXjbImahVshXv/WJpsJg+WRCow2HY3E= X-MC-Unique: CaMsqCKSO-6uZ_yVAlsw2w-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=yTmKvMxsRg6TDo1ZOS8kS+0m6cLpvXXwMo5jtOpsK98=; b=QbIrXGUhCwj1w2GbIO9p3uzR4i77A913QhZb8eai4SILX4qZMFhRBNQ1t9tdx1RkG/ stgOyuysyMPWFz/HlqkhawDc9MYIOuRV8v35ETttGqOXwp7MlWU7lM3WrglqW9adIfHf MQ8aPkl2KHEYA/awZHJFN090HTOZ0kBfDALN/3/MWGo8uVw2nf1bix3sZBlF+NKc4U0u VW9cU8pSXtZFuLFBbG9tvjjdRwylqn+XEElG8vwXGKZtDxRVtDskoljFx788WOOVy3bR 2WbpqCQrNBC2Ao6lS41zeuwEcJcbhHnrrVNfsGt0XHU8BPCBLx+DYG004kwtaAEvIVOn NTXg== X-Gm-Message-State: AOAM531AQbRK0cRrcwQa1gdNK6czCzv1I4Ntrl0NsEwXH9ysXBswHRwQ 7vZwdgGyQ6CcTCr57XVApjbucdOERQTwQjpIKRNj2tnoXdS+K4siCn4PPEjNoZqLRLI2E/kCWX5 j4PRDd/JBESOetWA= X-Received: by 2002:a5d:4ec3:: with SMTP id s3mr5876517wrv.103.1591819395109; Wed, 10 Jun 2020 13:03:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV7PU5Hok0cqrjyyL26FLB7N0HI1d3sRfeHGCP5fkiaDuIASYWGuckJO0jZ/GsbIxpZilkRQ== X-Received: by 2002:a5d:4ec3:: with SMTP id s3mr5876499wrv.103.1591819394890; Wed, 10 Jun 2020 13:03:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 5/8] hw/tpm: Move few declarations from 'tpm_util.h' to 'tpm_int.h' Date: Wed, 10 Jun 2020 22:02:44 +0200 Message-Id: <20200610200247.21378-6-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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/10 15:37:41 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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- 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:08:01 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=1591819933; cv=none; d=zohomail.com; s=zohoarc; b=alA17xcKxZ0jjV9scyDJgxZt2Euzxs6A2bCmnjCXO+Kwc7zftvxlPRGyQBqnLaYU8TwO0oQa9x2F2cb0JYR6MxZ1AHYWWM/pMfW2hM1sKZe+3J1G0TIC6kgn9i7YI0J72KRn7k3WFlenZM2ZxFLKoYMGUBtdm2LVpmWg/nxVjOY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819933; 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=3/5UhBc1iPrxzhHD36gZev3Sa1aP8yuUYEtevuhDJHg=; b=gDdmU/gfgSF/Zg9UJ36jG5gPVwCa3AkdmXIyhfawxTn6q0HTEH4yLr/XYVv2yKB+uK+befsps2DzVyWCXJsur8WezPxzpZMOop78I6StvqXR2X4bJ/FEW7AbkzJar33BE1jux0MScQn+ErjgenBrhWt+y4owrnwgcwqaBKx+YEg= 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 1591819933480544.8605251040216; Wed, 10 Jun 2020 13:12:13 -0700 (PDT) Received: from localhost ([::1]:42784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj752-0007HO-2m for importer@patchew.org; Wed, 10 Jun 2020 16:12:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wa-00048M-Na for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:28 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:44325 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 1jj6wZ-0000Yf-LD for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:28 -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-279-0tPdxLhzM8eujLQT5B19DA-1; Wed, 10 Jun 2020 16:03:21 -0400 Received: by mail-wm1-f69.google.com with SMTP id j128so734140wmj.6 for ; Wed, 10 Jun 2020 13:03:21 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id s8sm1317963wrg.50.2020.06.10.13.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819407; 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=3/5UhBc1iPrxzhHD36gZev3Sa1aP8yuUYEtevuhDJHg=; b=BKYvIaB30kqCinn8E42y2iFRLJ0LsQre27OdpZ/x2kTl9iKyVnXP51+tV1nJM5BmwMgNZd C4tOQP2/l+HKA2LQuXGNBTdeGx3eAT8GJ7ndd0u0CGlyKZfaJ24J+FvlQTEHd5aN27Bprs O8iYEO2CtPODukWncUxnQNo9fgcLEUU= X-MC-Unique: 0tPdxLhzM8eujLQT5B19DA-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=3/5UhBc1iPrxzhHD36gZev3Sa1aP8yuUYEtevuhDJHg=; b=kNrr/egqwGYyi3/RbjaiwvsBkfy67RcQCm4HF2vnDUBd1JLa0/ADzmDIYod2rc6BeM QcnT/trHROX1GyG4d8zY/Vubevb8eLUWNJwNtPDCEHiTGPhL8hAFXr/cNI9Si8PkuCM+ ic/0iHOaorpVehcput9hmTtdIFTnBzs0D4RczyTfRDq51O9LVL6Cw0Q7M0wwbzKff/IV V+i1pOJYYscgs0KtSflspi6I42sOBalJLG9XFZ97eCI14dBzgOTdNmkFFHNbdIQKbKPL RiQVONaT7Rk3lC+6aXRMpbJci3BwPuD7NR19dJTdQMtawRxNCaM8iOgs4vlEHUOrFntc GW8g== X-Gm-Message-State: AOAM5335qq/X4ibDpvp5q4KLqc1tfoYvOT0s8JTxhnI4JSnA1V8DVfqw vyDzLP6e+i1mQYyS5ZTEPZf1fYP1Zu8J2aYORXvXWZnbrosSB9oa3+/1oEy6rVWOyfj6SEhvAz9 o0V6I2z+m4CpIiTM= X-Received: by 2002:adf:9205:: with SMTP id 5mr5246501wrj.232.1591819400007; Wed, 10 Jun 2020 13:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMs7oVP6rAs/70ZjLoyG8AlDe1sLXg1KFwZKoUgrozu0Z7A3jukcwIVib6hDvBzIH5DWpwZg== X-Received: by 2002:adf:9205:: with SMTP id 5mr5246479wrj.232.1591819399786; Wed, 10 Jun 2020 13:03:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 6/8] hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header Date: Wed, 10 Jun 2020 22:02:45 +0200 Message-Id: <20200610200247.21378-7-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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/10 15:37:41 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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- 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:08:01 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=1591819740; cv=none; d=zohomail.com; s=zohoarc; b=GtBl2ijG6ciUcfm1qQrHgeERzHbNGMOBINHle8I+QP2950pzWQQwhKF70pb1oc/IGimF9r9ts0YbtjQTKGOmkQ5kqqqwYK8jK5lf8iSSse83H/4rHAzHEeh6PyGUFSoWurC/fJkQ6z8kkssRhO35KQ56FqFFiEhU3r8VqVySSVQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819740; 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=YBmA6OUMALtJ8xKCCMlgV7Bdi6Khl1WaOLeqs/fgHnc=; b=F+LjOwsgV4HeEUtfZoAJRufMv9/Ypx/LWdwne755t1IvGgrkQrAyewTIkk4LetoOfeSemWWJo8hXm5Mvy2yVN2UfnbCLwCkjaXPZP35FRLlQpiUZaAwuLnXpGkyd55uu0YGUFUcusLhY0Lja1qYRp+jW2lguaggKTb/zZTA5/uY= 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 1591819740943449.6273726837305; Wed, 10 Jun 2020 13:09:00 -0700 (PDT) Received: from localhost ([::1]:59542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj71v-0002OS-L1 for importer@patchew.org; Wed, 10 Jun 2020 16:08:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wb-00049x-GS for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:29 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:34721 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 1jj6wa-0000Yr-E2 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:29 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-g1MqwYADNMua87OORbkSJQ-1; Wed, 10 Jun 2020 16:03:26 -0400 Received: by mail-wm1-f72.google.com with SMTP id 14so703482wmi.8 for ; Wed, 10 Jun 2020 13:03:25 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id o10sm1219823wrq.40.2020.06.10.13.03.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819407; 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=YBmA6OUMALtJ8xKCCMlgV7Bdi6Khl1WaOLeqs/fgHnc=; b=ZXFrgQnoXk8g6Ab2uo23He3wx7BZiCAjCqL/hqpPQqyvaZqKv+c9MWi4IQ25XDygbkBAik wk6n0buab6FXygtG5x7FDBPHdjk7g3cEBUgyn0YybiXg3OJWvDSix5hHWu2S9n6mQgPXqO cSpmJXwQg7ZVjFBqp248+mBeSMkmK4A= X-MC-Unique: g1MqwYADNMua87OORbkSJQ-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=YBmA6OUMALtJ8xKCCMlgV7Bdi6Khl1WaOLeqs/fgHnc=; b=BqamJ2AQ5pFZF/A/fx0iyCGj5nhfrfxva3ot5f8gcL86wcsQJ1mmG/1o+ed63cX9oj FFJae09JkPSU+1sf2iab772+eF0dVbPbbW+xiUdHIjowSM3Tn8aIpxwoVrWmoG3YCt4d bXYRn1vJhygRCHF1pGfWAcbdnHtB0eDlT6dKoO9v9elRICEGQCMJUGqmKnUINS8IXPGv nYIIE9rEhgQ2DiF9tKpTEtmoDHAO/MVfGtRlC6X4iUfBw+DdJS7RROK6m5TkxLb25bAC 3+c9yg26ymD+ZQfSc6eyY5aJZNDeGxcsNOa/b41nvPWi4AzM6gUwncyOWTMw28BSS3K2 kzvw== X-Gm-Message-State: AOAM531qMCqEHvGh2oLrE0TjG7IB6JaSVsddOoxRpp2XVRFCMtEXnJC2 D4OaJ2fglrZ8jEqi8AiUSAmu/s5FkQmzp8oCsUoxPUQdmFCpu3V02TKbdK500mttcTmwDu4YDG/ 6sbQOyCgjtdFCZmw= X-Received: by 2002:adf:b697:: with SMTP id j23mr5862807wre.201.1591819404743; Wed, 10 Jun 2020 13:03:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQUd1a+5qxOQ935HoLy0GDgZvXy0rT93TNPtQkZs5a+DhdP4ana7+FXWbZRVyGNb5+OmatFQ== X-Received: by 2002:adf:b697:: with SMTP id j23mr5862788wre.201.1591819404547; Wed, 10 Jun 2020 13:03:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 7/8] hw/tpm: Make 'tpm_util.h' publicly accessible as "sysemu/tpm_util.h" Date: Wed, 10 Jun 2020 22:02:46 +0200 Message-Id: <20200610200247.21378-8-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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/10 15:37:41 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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Berger --- {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 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename {hw/tpm =3D> include/sysemu}/tpm_util.h (95%) 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 94704870f6..64206a6a3b 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 c0a0f3d71f..d0ec2a8235 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:08:01 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=1591819865; cv=none; d=zohomail.com; s=zohoarc; b=aCyOwdiES7MjGyP+2AHAMlhVS+F/vUTlNMAk3M4l+GVA1kq5jJvGO0VIoxdntu9fqMnjQPFt9adLAj+hf4AE00t90m2o90N2OMrDwH70h8Jj+LgcThXdMrsRIdRNUaHBSYsOjNBKl+kSrntXLFjKd51kg5r7hNthhZK35eyj+dA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591819865; 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=yPStGTvljaupscDCD16l41oWWDQxutbAuwnx4839CME=; b=JPhQDC3TzaK+nvfyQFcBOytjR/ta+SkAdZyAgA/B4kUkGoVjYJxzV9XxvOW2Px64CjPMJAHjDVi5oY88vtIWQkmZXkikreR6piB0t6Z/Obo6//T69GACNagNqGvqT4EfXTmW9Uwh7brbJXj+cGU3pudd8PrfYywCrkeAulz/RWM= 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 1591819865858279.5976326713984; Wed, 10 Jun 2020 13:11:05 -0700 (PDT) Received: from localhost ([::1]:37692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj73w-0005AG-Gs for importer@patchew.org; Wed, 10 Jun 2020 16:11:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj6wm-0004Re-6Z for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:41 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:35234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jj6wk-0000cB-E1 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 16:03:39 -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-7-FgB_un_kN7CClki6qgyvug-1; Wed, 10 Jun 2020 16:03:31 -0400 Received: by mail-wr1-f70.google.com with SMTP id l18so1554112wrm.0 for ; Wed, 10 Jun 2020 13:03:31 -0700 (PDT) Received: from x1w.redhat.com (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id y80sm889016wmc.34.2020.06.10.13.03.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 13:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591819417; 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=yPStGTvljaupscDCD16l41oWWDQxutbAuwnx4839CME=; b=Qphx96D1dPwG5PJ1lUMLYr2h0fSjzxjlHJ3r2RSYS439I9AqZvypfaCmn9nnASb0gkjdE3 6VcLM/98G2n77xfpyXMftJM2Us9fZ0EF7idY4FXjyBq3iN6N5C2TlPLRiN2GH91IgVxdbV 3vyeIqEW9HxpA/v9B8Dwk5RHSvALpRo= X-MC-Unique: FgB_un_kN7CClki6qgyvug-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=yPStGTvljaupscDCD16l41oWWDQxutbAuwnx4839CME=; b=LfiETEjtcj7l++SToNefIXuMRKEJF0UdGp0YJYXACYVuKbeWlHAdgdmiS02fFK5auc Py3zF2Weongagt9yzNe44Yu9Stmye/tzmA/1wJR/w3KwW6wVvQGiN3tTebS0F9nMbbtq 5CkhOwwyrF+dCxicVY7QotORumjuU2Wh3gV/5Qct1TrwOm4kI0t7TddYBNsIi5XqfIgy edE537tNK685ck5qNycg7ZOlfzh5GxLvFENArKJXhApke0pEhD3fZ90rRSomyeF1fX9P C+PWCNQN61Xxt9mAjo5ACjpWNxv6Hk/HECGW3dRivT2mMNNR8rgh24leYjtOJG2xQtuA c1bw== X-Gm-Message-State: AOAM531qkQ96ORAeb6WR1H8G5lIfgASoOFaPlnsuf3qd8NSabi4uYP/X gYOWxWaPtt4Q2bwT/xWToxV5zTuiHJDW6Rdv0WnGJDIWIQkN9IqD85VMB1Ba8ucAne7FwNDExr6 Uvin2Hso29JWBS6E= X-Received: by 2002:a1c:3987:: with SMTP id g129mr4691245wma.139.1591819409853; Wed, 10 Jun 2020 13:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyau4yzEheVpiKAbqcFln0U6/tSaPyeKFP1tggYt6Duh+cbooaQrnWFx9QVUzpSeOq4Ny91zA== X-Received: by 2002:a1c:3987:: with SMTP id g129mr4691209wma.139.1591819409373; Wed, 10 Jun 2020 13:03:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH 8/8] tpm: Move backend code under the 'backends/' directory Date: Wed, 10 Jun 2020 22:02:47 +0200 Message-Id: <20200610200247.21378-9-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200610200247.21378-1-philmd@redhat.com> References: <20200610200247.21378-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-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 15:37:41 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, URIBL_BLOCKED=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 , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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/ directory. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- RFC due to a FIXME in tpm_tis_common.c, it uses TRACE_TPM_UTIL_SHOW_BUFFER which is now generated by backends/trace-events... --- Makefile | 2 +- {hw/tpm =3D> backends}/tpm_int.h | 6 ++--- {hw/tpm =3D> backends}/tpm_ioctl.h | 0 {hw/tpm =3D> backends}/tpm_emulator.c | 0 {hw/tpm =3D> backends}/tpm_passthrough.c | 0 {hw/tpm =3D> backends}/tpm_util.c | 0 hw/tpm/tpm_tis_common.c | 1 + tests/qtest/tpm-emu.c | 2 +- MAINTAINERS | 2 +- backends/Kconfig | 14 +++++++++++ backends/Makefile.objs | 3 +++ backends/trace-events | 32 ++++++++++++++++++++++++ hw/tpm/Kconfig | 15 ------------ hw/tpm/Makefile.objs | 3 --- hw/tpm/trace-events | 34 +------------------------- 15 files changed, 57 insertions(+), 57 deletions(-) rename {hw/tpm =3D> backends}/tpm_int.h (96%) rename {hw/tpm =3D> backends}/tpm_ioctl.h (100%) rename {hw/tpm =3D> backends}/tpm_emulator.c (100%) rename {hw/tpm =3D> backends}/tpm_passthrough.c (100%) rename {hw/tpm =3D> backends}/tpm_util.c (100%) create mode 100644 backends/Kconfig 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/hw/tpm/tpm_int.h b/backends/tpm_int.h similarity index 96% rename from hw/tpm/tpm_int.h rename to backends/tpm_int.h index 9f72879d89..ba6109306e 100644 --- a/hw/tpm/tpm_int.h +++ b/backends/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_ioctl.h similarity index 100% rename from hw/tpm/tpm_ioctl.h rename to backends/tpm_ioctl.h diff --git a/hw/tpm/tpm_emulator.c b/backends/tpm_emulator.c similarity index 100% rename from hw/tpm/tpm_emulator.c rename to backends/tpm_emulator.c diff --git a/hw/tpm/tpm_passthrough.c b/backends/tpm_passthrough.c similarity index 100% rename from hw/tpm/tpm_passthrough.c rename to backends/tpm_passthrough.c diff --git a/hw/tpm/tpm_util.c b/backends/tpm_util.c similarity index 100% rename from hw/tpm/tpm_util.c rename to backends/tpm_util.c diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c index 64206a6a3b..70ca5bc7a9 100644 --- a/hw/tpm/tpm_tis_common.c +++ b/hw/tpm/tpm_tis_common.c @@ -36,6 +36,7 @@ #include "sysemu/tpm_util.h" #include "tpm_ppi.h" #include "trace.h" +#include "../backends/trace.h" /* FIXME TRACE_TPM_UTIL_SHOW_BUFFER */ =20 #include "tpm_tis.h" =20 diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c index c43ac4aef8..fd6a2a9aff 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_ioctl.h" #include "io/channel-socket.h" #include "qapi/error.h" #include "tpm-emu.h" diff --git a/MAINTAINERS b/MAINTAINERS index 3abe3faa4e..3a9425e3df 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*.c F: tests/qtest/*tpm* T: git https://github.com/stefanberger/qemu-tpm.git tpm-next =20 diff --git a/backends/Kconfig b/backends/Kconfig new file mode 100644 index 0000000000..4ac943957a --- /dev/null +++ b/backends/Kconfig @@ -0,0 +1,14 @@ +config TPMDEV + bool + depends on TPM + +config TPM_PASSTHROUGH + bool + default y + # FIXME: should check for x86 host as well + depends on TPMDEV && LINUX + +config TPM_EMULATOR + bool + default y + depends on TPMDEV diff --git a/backends/Makefile.objs b/backends/Makefile.objs index 28a847cd57..e3f244808e 100644 --- a/backends/Makefile.objs +++ b/backends/Makefile.objs @@ -2,6 +2,9 @@ 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_util.o +common-obj-$(CONFIG_TPM_PASSTHROUGH) +=3D tpm_passthrough.o +common-obj-$(CONFIG_TPM_EMULATOR) +=3D tpm_emulator.o =20 common-obj-y +=3D hostmem.o hostmem-ram.o common-obj-$(CONFIG_POSIX) +=3D hostmem-file.o diff --git a/backends/trace-events b/backends/trace-events index 59058f7630..e6f7b3215b 100644 --- a/backends/trace-events +++ b/backends/trace-events @@ -5,3 +5,35 @@ dbus_vmstate_pre_save(void) dbus_vmstate_post_load(int version_id) "version_id: %d" dbus_vmstate_loading(const char *id) "id: %s" dbus_vmstate_saving(const char *id) "id: %s" + +# tpm_passthrough.c +tpm_passthrough_handle_request(void *cmd) "processing command %p" +tpm_passthrough_reset(void) "reset" + +# 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_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" diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig index 4794e7fe28..3a9fd73a4b 100644 --- a/hw/tpm/Kconfig +++ b/hw/tpm/Kconfig @@ -1,7 +1,3 @@ -config TPMDEV - 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 TPMDEV =20 -config TPM_PASSTHROUGH - bool - default y - # FIXME: should check for x86 host as well - depends on TPMDEV && LINUX - -config TPM_EMULATOR - bool - default y - depends on TPMDEV - 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