From nobody Mon Feb 9 16:01:33 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=1591891952; cv=none; d=zohomail.com; s=zohoarc; b=eoeFwUDQx2KOzavmNUcfn9iUT1shBv6a05umUUN4ES9XtotDJ0bVmC65813N2V+A/d8w+rrEt9g5+vN/HZK+t2KJNAG/xFH7DyvN6MF9sY2uG1ABZ00DpARrMBh06c6R3kHtcXJZaCU+DvAxllKnUHl878ngzBEdl2t00R+4yjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591891952; 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=JjSWqQqpcU8YUr0i2Q2V06rERz8IBFSyf/gCWO3sw2ejQ1qManIs5MCgL3ZpqrBwaG1HCG5qSBYupo5Q1gTy1lUisvHtQIGelevxhX4XfYnWkKH2BieneeNav6gj8FyAMGUhxKwyro9Dw7d75+ddtyz/OcnIOqvnJjvrCIHUGlM= 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 1591891952111598.4579765082411; Thu, 11 Jun 2020 09:12:32 -0700 (PDT) Received: from localhost ([::1]:36774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjPoc-0002Xv-QE for importer@patchew.org; Thu, 11 Jun 2020 12:12:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPh2-0007HM-K5 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:04:40 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43537 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 1jjPgv-00015U-H7 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 12:04:36 -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-426-bIFoiYKlM_m4d-pGUhqaBQ-1; Thu, 11 Jun 2020 12:04:00 -0400 Received: by mail-wr1-f72.google.com with SMTP id t5so2712736wro.20 for ; Thu, 11 Jun 2020 09:03:59 -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 z206sm4990080wmg.30.2020.06.11.09.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 09:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591891472; 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=M1D5l6cKFrgGNWzeQOfq3Ctm34NLrAi/76kjhUV2A2R+AHKxN+Q20SjGkIBR1IJKl/slqw BVVIyQUKMQ89zd5rCmx/CjOy8r+CgthGQeQEDShD18j4CO39qWElvWeK7lko6WXqJTYqY1 JC32hCjCw9DiToL3dpcAVXQCdNYL3MU= X-MC-Unique: bIFoiYKlM_m4d-pGUhqaBQ-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=dsrU2hawzG3HQpQ15xXYmqlbzbQPRNgkPhnJPeW0v1+i+LlLPHLrKkaQf367n7iTKp SC2NoySginkrtixBMwvlpxKRuIcSwFQpXjz2RyNEm4VefamG/EOXoOAlXIp9Rcy7R13F 3neGLLKJBaPJb5I8EgC5bv1PTDz7ugd/vDn4M/EjAztIIWJ99YQIYO1mbw/dkefY2yoa 4ynYQkLaWpZ2CvihhiZnSgUVapZV/RG94Ta9z4p2cYAFF6NRWt5srSJyjspkMX9IaQTT 4wR0cu+s9oWRyp1ZBo+bnPs18BiDHncoFBw1h2EjiXIEksEsEoDYUKCZKjb3y25WuhdB 35sQ== X-Gm-Message-State: AOAM53283Fnr9Oe0D+zu3KM8YOuvNjn5TQ/GJgMXkORcPBfZi0wf6sM6 M7FMHquNP/gbOLY6D+6NuLKnx3H3vKs8fDttveifRT57Qv++k9evq6hDkhfuOY2FmemSQClHC/M e37FI5Mp7+dSGm9w= X-Received: by 2002:a1c:e40a:: with SMTP id b10mr8578133wmh.41.1591891435611; Thu, 11 Jun 2020 09:03:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynp5Vfe+J/amzkiVBC5jheUTPpLuFTgZf1g1u8LUmc6MfUXOw/4NlKcngL6hJoiQq1LEEPcA== X-Received: by 2002:a1c:e40a:: with SMTP id b10mr8578112wmh.41.1591891435343; Thu, 11 Jun 2020 09:03:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 09/11] hw/tpm: Move DEFINE_PROP_TPMBE() macro to 'tmp_prop.h' local header Date: Thu, 11 Jun 2020 18:03:04 +0200 Message-Id: <20200611160306.2751-10-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200611160306.2751-1-philmd@redhat.com> References: <20200611160306.2751-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , David Gibson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Berger 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