From nobody Sun Jul 26 12:31:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1781861554; cv=none; d=zohomail.com; s=zohoarc; b=DBxNJWpBRXNCLTtjFPg3CjYZ4vO3d9lY9SCyS9oRc18q4u0aiG6/o2cZQFmQBvYdplOxOhhr7c6jgxC/7yGtSgDLV6//MbYaV38+OFAUGQTLJ6/clu+5YQkuGVdpEmL1JPonpdQdFl6CmT9zWuFxez/Vj8mR+mPYIfxJI4q2qIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781861554; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=H7d3hejmPS8Cty7Wq2vvEVZx9APcf+hzhdVW5f8yQ/Y=; b=oI1EUg8eRSVFuGdvtMwZbej2NXkz+iF62TsikEFbwbRfpWHDRzrNlWJKEpQORB7RvSZNwAKaeacbayOh8l25YWTcP/3KkoqM60foc0VW+PHv6447Amx+RuIIXB3qt0TzLnriX3DBjcoK7FTFARQgUQXqtn82c/7U75hIvs9FtE0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781861554178326.1780284555857; Fri, 19 Jun 2026 02:32:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1waVa0-00060Z-UM; Fri, 19 Jun 2026 05:32:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1waVZr-0005zY-K2 for qemu-devel@nongnu.org; Fri, 19 Jun 2026 05:31:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1waVZq-0003Kr-5C for qemu-devel@nongnu.org; Fri, 19 Jun 2026 05:31:55 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-437-odXh5Tl0Os2Cj_RzpdblTw-1; Fri, 19 Jun 2026 05:31:50 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 43CD7195605B; Fri, 19 Jun 2026 09:31:49 +0000 (UTC) Received: from mbawa-thinkpadt14gen5.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6529C1956088; Fri, 19 Jun 2026 09:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781861512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H7d3hejmPS8Cty7Wq2vvEVZx9APcf+hzhdVW5f8yQ/Y=; b=Kb7utZkovFuuDPVXDFWovkJ9zeRtxpUVE9EF17+KfSgeDhckAP7LrBH0U/DiqdT8U3aUtQ FmM+iTHlgFux8gzTP9TGFM5hvQ9I+xNo3Kj2N7gDvZ8Q1UkwvF9pS/v2egoQaJQnH1w7YG q05WvXSv9/MKuDWb911vV6Jve+q6ioU= X-MC-Unique: odXh5Tl0Os2Cj_RzpdblTw-1 X-Mimecast-MFC-AGG-ID: odXh5Tl0Os2Cj_RzpdblTw_1781861509 From: Mohammadfaiz Bawa To: Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Peter Maydell Cc: Zhao Liu Subject: [PATCH v3 1/3] hw/core/platform-bus: guard platform_bus_get_mmio_addr() against NULL Date: Fri, 19 Jun 2026 15:01:38 +0530 Message-ID: <20260619093140.832136-2-mbawa@redhat.com> In-Reply-To: <20260619093140.832136-1-mbawa@redhat.com> References: <20260619093140.832136-1-mbawa@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mbawa@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1781861557664158500 Content-Type: text/plain; charset="utf-8" sysbus_mmio_get_region() returns NULL when a device has fewer MMIO regions than the requested slot index. platform_bus_get_mmio_addr() passes the result directly to memory_region_is_mapped() without a NULL check, causing a SIGSEGV. Return -1 early when the region pointer is NULL, consistent with the existing "not mapped" path. Reviewed-by: Peter Maydell Signed-off-by: Mohammadfaiz Bawa --- hw/core/platform-bus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c index a2217a2dee..16d0ecc0f3 100644 --- a/hw/core/platform-bus.c +++ b/hw/core/platform-bus.c @@ -59,8 +59,7 @@ hwaddr platform_bus_get_mmio_addr(PlatformBusDevice *pbus= , SysBusDevice *sbdev, Object *pbus_mr_obj =3D OBJECT(pbus_mr); Object *parent_mr; =20 - if (!memory_region_is_mapped(sbdev_mr)) { - /* Region is not mapped? */ + if (!sbdev_mr || !memory_region_is_mapped(sbdev_mr)) { return -1; } =20 --=20 2.54.0 From nobody Sun Jul 26 12:31:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1781861574; cv=none; d=zohomail.com; s=zohoarc; b=En7QXXGF/SmV70fosx+Nf4OUGp6Aifn1cXJ3dJ5j/nYjG0J0sV1Ydt0uWZ4RsJII9NatS496EcI/gnCxfktYFCYDp4qwHTlDwVFWOAgrxWDhUOizLIHKSAfPFpxF2nkj16GL+L3vq61dmnaUtV/7AteLH8gnQ2hDtubCbbGqZwM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781861574; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rzpoEAPFv5OA3Buau/xvvnFoyBxxiJ4N44RYgjM+t/o=; b=chhuZQseykupjBP56irzEXLiwNJdVjibVLs1yexLS3D+TsJDNsPu4IC3IkDAejFWWRBuOLpMhOSIPV3DdQgf792OA3VBfn5Akp0OMTYLatHUixjhJOE4Oek+7MGOxw/ndbadk7rbJXl1dbkMLemgt+qqJUu3FQ3TtNqNW/yg2NA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781861574918245.69779612669845; Fri, 19 Jun 2026 02:32:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1waVaC-00066L-MJ; Fri, 19 Jun 2026 05:32:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1waVZw-00060a-Va for qemu-devel@nongnu.org; Fri, 19 Jun 2026 05:32:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1waVZv-0003MR-IA for qemu-devel@nongnu.org; Fri, 19 Jun 2026 05:32:00 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-245-YpmCX8jaOfajQ3VdbjCOVA-1; Fri, 19 Jun 2026 05:31:54 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CAA9719540FE; Fri, 19 Jun 2026 09:31:52 +0000 (UTC) Received: from mbawa-thinkpadt14gen5.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DAB921956088; Fri, 19 Jun 2026 09:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781861518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rzpoEAPFv5OA3Buau/xvvnFoyBxxiJ4N44RYgjM+t/o=; b=IqOWcxYSs3jE4YT2iEZTcJfaRwSB8zfK4K0m1+AhF1UMfrTENejR830qy8TS00qARwR/nU NtpkBN4VRJtkQL77q74cxDo0LkhiEFzkXlizi0QN+8p1dyjjSiwQb2Jbyq3gd6OOwro4ch WVeMrlO1nJk+AVjMq2m9qWLwfQR6YhE= X-MC-Unique: YpmCX8jaOfajQ3VdbjCOVA-1 X-Mimecast-MFC-AGG-ID: YpmCX8jaOfajQ3VdbjCOVA_1781861513 From: Mohammadfaiz Bawa To: Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Peter Maydell Cc: Zhao Liu Subject: [PATCH v3 2/3] hw/tpm: gate PPI support on tpm-tis-device behind a device property Date: Fri, 19 Jun 2026 15:01:39 +0530 Message-ID: <20260619093140.832136-3-mbawa@redhat.com> In-Reply-To: <20260619093140.832136-1-mbawa@redhat.com> References: <20260619093140.832136-1-mbawa@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mbawa@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1781861575147158501 Content-Type: text/plain; charset="utf-8" Add a "ppi" boolean property (default: true) to tpm-tis-device. When ppi=3Doff the RAMBlock is never registered and the migration stream omits "tpm-ppi", restoring backward compatibility. Move sysbus_init_mmio() calls from instance_init to realizefn so the memory regions are initialized before being registered. When ppi=3Doff, the PPI MMIO region is simply not exposed. Fixes: 46cd2c1050f0 ("hw/tpm: add PPI support to tpm-tis-device for ARM64 v= irt") Signed-off-by: Mohammadfaiz Bawa Reviewed-by: Stefan Berger --- hw/tpm/tpm_tis.h | 1 + hw/tpm/tpm_tis_sysbus.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h index 1531620bf9..6ac9804050 100644 --- a/hw/tpm/tpm_tis.h +++ b/hw/tpm/tpm_tis.h @@ -76,6 +76,7 @@ typedef struct TPMState { size_t be_buffer_size; =20 TPMPPI ppi; + bool ppi_enabled; } TPMState; =20 extern const VMStateDescription vmstate_locty; diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index 16bb17874b..a7b0002d82 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -94,6 +94,7 @@ static void tpm_tis_sysbus_reset(DeviceState *dev) static const Property tpm_tis_sysbus_properties[] =3D { DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, TPM_TIS_IRQ), DEFINE_PROP_TPMBE("tpmdev", TPMStateSysBus, state.be_driver), + DEFINE_PROP_BOOL("ppi", TPMStateSysBus, state.ppi_enabled, true), }; =20 static void tpm_tis_sysbus_initfn(Object *obj) @@ -101,9 +102,7 @@ static void tpm_tis_sysbus_initfn(Object *obj) TPMStateSysBus *sbdev =3D TPM_TIS_SYSBUS(obj); TPMState *s =3D &sbdev->state; =20 - sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio); sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq); - sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->ppi.ram); } =20 static void tpm_tis_sysbus_realizefn(DeviceState *dev, Error **errp) @@ -122,14 +121,19 @@ static void tpm_tis_sysbus_realizefn(DeviceState *dev= , Error **errp) return; } =20 - s->ppi.buf =3D qemu_memalign(host_page_size, - ROUND_UP(TPM_PPI_ADDR_SIZE, host_page_size)= ); memory_region_init_io(&s->mmio, OBJECT(dev), &tpm_tis_memory_ops, s, "tpm-tis-mmio", TPM_TIS_NUM_LOCALITIES << TPM_TIS_LOCALITY_SHIFT= ); - memory_region_init_ram_device_ptr(&s->ppi.ram, OBJECT(dev), "tpm-ppi", - TPM_PPI_ADDR_SIZE, s->ppi.buf); - vmstate_register_ram(&s->ppi.ram, dev); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio); + + if (s->ppi_enabled) { + s->ppi.buf =3D qemu_memalign(host_page_size, + ROUND_UP(TPM_PPI_ADDR_SIZE, host_page_s= ize)); + memory_region_init_ram_device_ptr(&s->ppi.ram, OBJECT(dev), "tpm-p= pi", + TPM_PPI_ADDR_SIZE, s->ppi.buf); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->ppi.ram); + vmstate_register_ram(&s->ppi.ram, dev); + } } =20 static void tpm_tis_sysbus_class_init(ObjectClass *klass, const void *data) --=20 2.54.0 From nobody Sun Jul 26 12:31:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1781861584; cv=none; d=zohomail.com; s=zohoarc; b=jeOyTsy69qkTrrzlKIk+/QLufO2BAuksGAKgrxFq9S3V5eK6NxK1f3nLqNZ01pUUQVcnd1nhxTgmpScXYjqz7iHWQmzObuCfktVaKxM9B5Px002L1rwq/o0DK+jzJTjnm3hoekFvuXZ6AYwH693Ty9VdgoAeC+XhjO/Ell+7vbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781861584; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gQ2HpR0WFgqm8qJgydfubSQlOn0F80nDU3NQ+9sYN1k=; b=mPl1S3pjE6R3vscoYMVAI71qMC6rsoF/KIt8X54Y6ZaMZry4FPNNTktEj6JXIG45uVH5ylnBxU9gwl/Sv/1s63KeTi+Enh0CLk0O/I/xmeejZ33tZ27hk9Ewxn5bmscIJO2ncN8RkCfy9iuGKhkHzeC9x3c+nRg6CmqEAIvAS6o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781861584864577.654921218957; Fri, 19 Jun 2026 02:33:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1waVa6-00061y-F7; Fri, 19 Jun 2026 05:32:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1waVZz-00060w-Vs for qemu-devel@nongnu.org; Fri, 19 Jun 2026 05:32:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1waVZy-0003Mf-F9 for qemu-devel@nongnu.org; Fri, 19 Jun 2026 05:32:03 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-T3MrzZKONua1C3Ymwz5a4Q-1; Fri, 19 Jun 2026 05:31:57 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0FDE2195396E; Fri, 19 Jun 2026 09:31:56 +0000 (UTC) Received: from mbawa-thinkpadt14gen5.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6615F195608A; Fri, 19 Jun 2026 09:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781861521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gQ2HpR0WFgqm8qJgydfubSQlOn0F80nDU3NQ+9sYN1k=; b=I3fNTtCtZdxC/uRwiQsYFyd7kOrnTMQ20ftRAtG8dU370ev9m5Yjb4QnR9/mzq8fRgkeEH NW0st0LxmSGspoS8+Fdmk/vNOHEVmr7IJHUSlAtOwfdVe3J/MUAjXjLjbDJYFTxOrz2vIl Ew3lwC32vLWFB6+Pw6lBkOlaw9Y/RKY= X-MC-Unique: T3MrzZKONua1C3Ymwz5a4Q-1 X-Mimecast-MFC-AGG-ID: T3MrzZKONua1C3Ymwz5a4Q_1781861516 From: Mohammadfaiz Bawa To: Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Peter Maydell Cc: Zhao Liu Subject: [PATCH v3 3/3] hw/core/machine: disable tpm-tis-device PPI for machine type <= 11.0 Date: Fri, 19 Jun 2026 15:01:40 +0530 Message-ID: <20260619093140.832136-4-mbawa@redhat.com> In-Reply-To: <20260619093140.832136-1-mbawa@redhat.com> References: <20260619093140.832136-1-mbawa@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mbawa@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1781861587386158500 Content-Type: text/plain; charset="utf-8" Set ppi=3Doff in hw_compat_11_0[] so that older machine types do not register the "tpm-ppi" RAMBlock, restoring backward migration. Signed-off-by: Mohammadfaiz Bawa Reviewed-by: Stefan Berger --- hw/core/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index 9a10e45aab..92cf5e1ca1 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -44,6 +44,7 @@ GlobalProperty hw_compat_11_0[] =3D { { "chardev-vc", "encoding", "cp437" }, { "tpm-crb", "cap-chunk", "off" }, { "tpm-crb", "x-allow-chunk-migration", "off" }, + { "tpm-tis-device", "ppi", "off" }, { TYPE_ARM_SMMUV3, "ats", "off" }, { TYPE_ARM_SMMUV3, "ril", "on" }, { TYPE_ARM_SMMUV3, "ssidsize", "0" }, --=20 2.54.0