All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 21/48] hw/tpm: Remove CRBState::ppi_enabled field
Date: Wed, 22 Apr 2026 21:57:19 +0200	[thread overview]
Message-ID: <20260422195746.88865-22-philmd@linaro.org> (raw)
In-Reply-To: <20260422195746.88865-1-philmd@linaro.org>

The CRBState::ppi_enabled boolean was only set in the
hw_compat_3_1[] array, via the 'ppi=false' property.
We removed all machines using that array, and the array
itself in commit a861ffef237 ("hw/core/machine: Remove
the hw_compat_3_1[] array"). We can safely remove the
now unused property. Since CRB devices always use PPI,
simplify removing the CRBState::ppi_enabled field.
Set the generic TPMIfClass::ppi_enabled so ACPI subsystem
can keep checking its availability.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20260317120241.16320-4-philmd@linaro.org>
---
 hw/tpm/tpm_crb.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 8723536f931..02701ab9480 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -43,7 +43,6 @@ struct CRBState {
 
     size_t be_buffer_size;
 
-    bool ppi_enabled;
     TPMPPI ppi;
 };
 typedef struct CRBState CRBState;
@@ -228,16 +227,13 @@ static const VMStateDescription vmstate_tpm_crb = {
 
 static const Property tpm_crb_properties[] = {
     DEFINE_PROP_TPMBE("tpmdev", CRBState, tpmbe),
-    DEFINE_PROP_BOOL("ppi", CRBState, ppi_enabled, true),
 };
 
 static void tpm_crb_reset(void *dev)
 {
     CRBState *s = CRB(dev);
 
-    if (s->ppi_enabled) {
-        tpm_ppi_reset(&s->ppi);
-    }
+    tpm_ppi_reset(&s->ppi);
     tpm_backend_reset(s->tpmbe);
 
     memset(s->regs, 0, sizeof(s->regs));
@@ -303,10 +299,8 @@ static void tpm_crb_realize(DeviceState *dev, Error **errp)
     memory_region_add_subregion(get_system_memory(),
         TPM_CRB_ADDR_BASE + sizeof(s->regs), &s->cmdmem);
 
-    if (s->ppi_enabled) {
-        tpm_ppi_init(&s->ppi, get_system_memory(),
-                     TPM_PPI_ADDR_BASE, OBJECT(s));
-    }
+    tpm_ppi_init(&s->ppi, get_system_memory(),
+                 TPM_PPI_ADDR_BASE, OBJECT(s));
 
     if (xen_enabled()) {
         tpm_crb_reset(dev);
@@ -325,6 +319,7 @@ static void tpm_crb_class_init(ObjectClass *klass, const void *data)
     dc->vmsd  = &vmstate_tpm_crb;
     dc->user_creatable = true;
     tc->model = TPM_MODEL_TPM_CRB;
+    tc->ppi_enabled = true;
     tc->get_version = tpm_crb_get_version;
     tc->request_completed = tpm_crb_request_completed;
 
-- 
2.53.0



  parent reply	other threads:[~2026-04-22 20:01 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 19:56 [PULL 00/49] Misc HW patches for 2026-04-22 Philippe Mathieu-Daudé
2026-04-22 19:56 ` [PULL 01/48] hw/avr: Build as common unit files Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 02/48] hw/misc/cpc: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 03/48] hw/alpha: Include full path to target 'cpu.h' header Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 04/48] hw/arm: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 05/48] hw/avr: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 06/48] hw/hppa: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 07/48] hw/i386: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 08/48] hw/m68k: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 09/48] hw/microblaze: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 10/48] hw/mips: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 11/48] hw/or1k: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 12/48] hw/ppc: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 13/48] hw/riscv: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 14/48] hw/s390x: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 15/48] hw/sh4: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 16/48] hw/sparc: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 17/48] hw/tricore: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 18/48] hw/xtensa: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 19/48] hw/tpm: Factor tpm_ppi_enabled() out Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 20/48] hw/tpm: Add TPMIfClass::ppi_enabled field Philippe Mathieu-Daudé
2026-04-22 19:57 ` Philippe Mathieu-Daudé [this message]
2026-04-22 19:57 ` [PULL 22/48] hw/tpm: Propagate @ppi_enabled to tpm_tis_reset() and remove in TPMState Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 23/48] hw/tpm: Simplify tpm_ppi_enabled() Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 24/48] hw/ppc/spapr: Un-inline rtas_load/store() helpers Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 25/48] hw/hyperv: Replace legacy ld_phys() -> address_space_ld() Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 26/48] system/memory: Constify various AddressSpace arguments (flatview) Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 27/48] hw/core: Move compat_props_add() to 'hw/core/boards.h' Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 28/48] qom: Declare GlobalProperty structure in 'qom/compat-properties.h' Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 29/48] qom: Declare compat properties API " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 30/48] qom: Restrict compat properties API to system emulation Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 31/48] docs/specs/tpm: document PPI support on ARM64 virt Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 32/48] hw/acpi/tpm: parameterize PPI base address in tpm_build_ppi_acpi Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 33/48] hw/tpm: add PPI support to tpm-tis-device for ARM64 virt Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 34/48] physmem: Simplify dirty memory type checks with loop Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 35/48] hw/arm/smmuv3: Have smmuv3_accel_init() take an Error* parameter Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 36/48] hw/arm/smmuv3: Avoid including CONFIG_DEVICES in hw/ header Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 37/48] hw/ppc/e500: fix bus-frequency property hardcoded to zero in CPU FDT node Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 38/48] ati-vga: fix unsigned integer overflow in cursor bounds checks Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 39/48] ati-vga: mask out lock bit from CUR_OFFSET in cursor offset calculation Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 40/48] hw/virtio/virtio-iommu: remove duplicate include Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 41/48] hw/hyperv: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 42/48] hw/ppc/amigaone: " Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 43/48] hw/misc: Fix the valid access size to the avr-power device Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 44/48] hw/sh4/sh7750: Remove forgotten abort() in the MM_ITLB_DATA handler Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 45/48] MAINTAINERS: Remove my unused git tree locations Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 46/48] MAINTAINERS: Remove my disfunctional emails Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 47/48] MAINTAINERS: Remove PhilMD from NVMe Block Driver Philippe Mathieu-Daudé
2026-04-22 19:57 ` [PULL 48/48] MAINTAINERS: Transfer CI maintenance to Pierrick Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260422195746.88865-22-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.