From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092810651680.9860184695452; Fri, 10 Oct 2025 03:40:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AVc-0002v1-Fh; Fri, 10 Oct 2025 06:38:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVY-0002sK-OR; Fri, 10 Oct 2025 06:37:56 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVM-0006sc-4i; Fri, 10 Oct 2025 06:37:56 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVST065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:41 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=ThpKeDV0ZQY9hCLvKxm2yckErAKZ6MOcSv7qQfLWJ8s=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092602; v=1; b=oKaQkfjtjYg96YMBz/oyisBEp17NWcxfGbA9/pvZG1dDmg9sTLbBmFt9JtjV28by L02ol7XOJgrPIRBX8Tc+R4DBKYS52W5DYUpmG6OizACxkNydTT+1rPqb1lTC2Syd /AQ7OJ2ROgh3uzgub3Qrih3HFJNkMz0QOAYp06aQZW5JoTzQcZvxGg+OtDCgHcpv aCNQdIx64DjtHqX6D1l9reeWUxTkBDDgWpKRYOr5UeONynpMoqElh7ik+JGAWU5k kZY/E1ouw1+Zd/Sw7sQwYqMIKg2+DbI2teyY2/GF+VGm/OmWCW/cOLwhyOZ20vji XJuB4c90IkXbbNUT9xc+kQ== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:29 +0900 Subject: [PATCH v2 01/12] qdev: Automatically delete memory subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-1-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092813297154100 It is a common requirement of qdev to delete memory subregions to hide them from address spaces during unrealization. pci automatically deletes the IO subregions, but this process is manually implemented in other places, which is tedious and error-prone. Let qdev enumerate all child memory regions, check if they have containers, and delete them if so. The automatic deletion happens only after the device-specific unrealization code. This allows that the device-specific can continue to assume that subregions they added are present until unrealization finishes. So existing memory_region_del_subregion() calls in device-specific code will not fail but will be no-op. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + include/hw/qdev-core.h | 1 + hw/core/qdev.c | 14 ++++++++++++++ stubs/memory.c | 9 +++++++++ stubs/meson.build | 1 + 5 files changed, 26 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 84cfd85e1fa1..f2ef02858e30 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3241,6 +3241,7 @@ F: include/system/physmem.h F: include/system/ram_addr.h F: include/system/ramblock.h F: include/system/memory_mapping.h +F: stubs/memory.c F: system/dma-helpers.c F: system/ioport.c F: system/memory.c diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index a7bfb10dc70c..bd4d8049c435 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -526,6 +526,7 @@ bool qdev_realize_and_unref(DeviceState *dev, BusState = *bus, Error **errp); * - unrealize any child buses by calling qbus_unrealize() * (this will recursively unrealize any devices on those buses) * - call the unrealize method of @dev + * - remove @dev from memory * * The device can then be freed by causing its reference count to go * to zero. diff --git a/hw/core/qdev.c b/hw/core/qdev.c index fab42a727059..622d4451e637 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -480,6 +480,17 @@ static bool check_only_migratable(Object *obj, Error *= *errp) return true; } =20 +static int del_memory_region(Object *child, void *opaque) +{ + MemoryRegion *mr =3D (MemoryRegion *)object_dynamic_cast(child, TYPE_M= EMORY_REGION); + + if (mr && mr->container) { + memory_region_del_subregion(mr->container, mr); + } + + return 0; +} + static void device_set_realized(Object *obj, bool value, Error **errp) { DeviceState *dev =3D DEVICE(obj); @@ -611,6 +622,7 @@ static void device_set_realized(Object *obj, bool value= , Error **errp) if (dc->unrealize) { dc->unrealize(dev); } + object_child_foreach(OBJECT(dev), del_memory_region, NULL); dev->pending_deleted_event =3D true; DEVICE_LISTENER_CALL(unrealize, Reverse, dev); } @@ -635,6 +647,8 @@ post_realize_fail: } =20 fail: + object_child_foreach(OBJECT(dev), del_memory_region, NULL); + error_propagate(errp, local_err); if (unattached_parent) { /* diff --git a/stubs/memory.c b/stubs/memory.c new file mode 100644 index 000000000000..9c36531ae542 --- /dev/null +++ b/stubs/memory.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "system/memory.h" + +void memory_region_del_subregion(MemoryRegion *mr, + MemoryRegion *subregion) +{ +} diff --git a/stubs/meson.build b/stubs/meson.build index 5d577467bfdd..d3af15963ae1 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -96,5 +96,6 @@ if have_system or have_user =20 # Also included in have_system for tests/unit/test-qdev-global-props stub_ss.add(files('hotplug-stubs.c')) + stub_ss.add(files('memory.c')) stub_ss.add(files('sysbus.c')) endif --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092735720933.4290908453372; Fri, 10 Oct 2025 03:38:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AVY-0002sc-UI; Fri, 10 Oct 2025 06:37:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVU-0002qG-LK; Fri, 10 Oct 2025 06:37:52 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVM-0006sb-5Q; Fri, 10 Oct 2025 06:37:52 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSU065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:42 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=eeuVsJCDwKbW8icJDfICufxGLQvTBPTzkETbuI6aCMQ=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092602; v=1; b=A99VkwX/Ev/4tHnVY2pnAk6xkmL2964tU+6QOolipkuDGb0XkHg+kHPA7NOaMhUK oOg0v1Wag83SNpLovo7t7zyTe43Z77yeMqdZ83gV6bixt6mFgoK9DOI80QDRne/j FFvfeYFyVPikzRzEmXf+c9kKG1Rwk+pQM6rphlnzJwcBW8+pjdl/pXWhNkv9Lhgr Jrg1dxptcY0wc1kX4qe8xpcjByCM4gFdsBFq4x7e4K8FEdtqrhe1vdRr9hSaUiBp ts0BkpeCqNjxk6RIZl2NDkIheJGlstgR2TQcarzNuiHU8R2AAfzAwYK5WjAdlr5U WOydQrB2ZYUd9+kfz8acJA== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:30 +0900 Subject: [PATCH v2 02/12] hw/char/diva-gsp: Do not delete the subregion MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-2-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092739226154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/char/diva-gsp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/char/diva-gsp.c b/hw/char/diva-gsp.c index e1f0713cb794..1ae472e879b5 100644 --- a/hw/char/diva-gsp.c +++ b/hw/char/diva-gsp.c @@ -63,7 +63,6 @@ static void diva_pci_exit(PCIDevice *dev) for (i =3D 0; i < pci->ports; i++) { s =3D pci->state + i; qdev_unrealize(DEVICE(s)); - memory_region_del_subregion(&pci->membar, &s->io); g_free(pci->name[i]); } qemu_free_irqs(pci->irqs, pci->ports); --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092786668927.6246821749313; Fri, 10 Oct 2025 03:39:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AVW-0002r9-5S; Fri, 10 Oct 2025 06:37:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVT-0002pO-6Y; Fri, 10 Oct 2025 06:37:51 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVL-0006sK-Hb; Fri, 10 Oct 2025 06:37:49 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSV065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:42 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=xlkYCVwFFZ/2dAGn2F5xgdv9x2YW7OHAuAIdxTeP5nU=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092603; v=1; b=H9o0ZBSCvwn1CZQdduTR+OR0C7lel7gaPpON7N4t+WoyYSEQvYc2fkMXc9/Wqp/f 0kT8Ni6uiElbBNvd5VWNjDwBkcyIlGhjD0VKxUUApLlxmXiF6Jl5Y16F3VVNHFi6 ezQWt227nQaNUvePhpTYpplQywNq8JH2+Rp3YDnVNAfKboD0t9G7L0K3XtNoZriM YV0dFhVCkSYvLbE224N5ayiWLAr1rNAYtEQKO2TzvMEG+XipmLLxf36//UlYW+C9 CzJjS+ReGvEfKItzBJRraJIytXL/ilFeMlRmzcmvNuGjgO0+IXqV+3oOngMkyNkk VeZuJBiiFfwod9xsWvsr5A== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:31 +0900 Subject: [PATCH v2 03/12] hw/char/serial-pci-multi: Do not delete the subregion MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-3-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092788938154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/char/serial-pci-multi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/char/serial-pci-multi.c b/hw/char/serial-pci-multi.c index 34f30fb70b80..986c14e6c71c 100644 --- a/hw/char/serial-pci-multi.c +++ b/hw/char/serial-pci-multi.c @@ -57,7 +57,6 @@ static void multi_serial_pci_exit(PCIDevice *dev) for (i =3D 0; i < pci->ports; i++) { s =3D pci->state + i; qdev_unrealize(DEVICE(s)); - memory_region_del_subregion(&pci->iobar, &s->io); g_free(pci->name[i]); } } --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092784216987.1826871477289; Fri, 10 Oct 2025 03:39:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AWE-00034P-Q5; Fri, 10 Oct 2025 06:38:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AWC-000338-ET; Fri, 10 Oct 2025 06:38:36 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AWA-0006y6-8m; Fri, 10 Oct 2025 06:38:36 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSW065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:43 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=TnkAVUPt94jHFzYRxW+Zo8oRA9b9oUhjR9/nHExe2Gw=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092603; v=1; b=Lx4QzSwztOcf8zrb/k40elzNphGoWfSnETvddRZFJlHulieoabAgu5DCeISdCAOi bV5s3/n64xRw2SD/OluCANJxuGPCF4YQ4BSzl9Pat99gZvjLeLJmpONVylx8u49H +/BXI4b5rMFyr2Eo5YztMR3XsB/KtP/kK2dqFcISwMuJ2d8I9M7jGo5sLwIDCSS/ 5uOojjv67ebsiZfLmBto9qkDtqgJjy63eMAQtAckqrPr1x4Dl1jmkIbH9dmx3ggu EFUoXlfVkNujueXVuwl/QPEFtqztssl+GfYSa8KCn4+xgqGuEaYvAs+cVRpcR9v9 kw83lVwT9sm5DTdPB2HqaA== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:32 +0900 Subject: [PATCH v2 04/12] secondary-vga: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-4-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092786757158500 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/display/vga-pci.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index b81f7fd2d0fd..90b4545d3821 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -307,14 +307,6 @@ static void pci_secondary_vga_exit(PCIDevice *dev) VGACommonState *s =3D &d->vga; =20 graphic_console_close(s->con); - memory_region_del_subregion(&d->mmio, &d->mrs[0]); - memory_region_del_subregion(&d->mmio, &d->mrs[1]); - if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { - memory_region_del_subregion(&d->mmio, &d->mrs[2]); - } - if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_EDID)) { - memory_region_del_subregion(&d->mmio, &d->mrs[3]); - } } =20 static void pci_secondary_vga_init(Object *obj) --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092777702918.1786564647796; Fri, 10 Oct 2025 03:39:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AVg-0002yR-In; Fri, 10 Oct 2025 06:38:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVe-0002x3-Ec; Fri, 10 Oct 2025 06:38:02 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVN-0006t8-IJ; Fri, 10 Oct 2025 06:38:02 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSX065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:43 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=xaI2KenS6q6E7iB3V1ZG5UGfMQv+qfK+9G24Jw3H4nE=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092604; v=1; b=gRbcPbHOu/vFcnDMQVYe5WKiUWO8Yx69jtvZq0OwZmuixuXtrZXKmrWPV14+WIjj jvVbyni/+x8tSwRXGnLhyjQc01WDOV7eiLDaTqA9Zd1ajvcTMJQugwH6A8WMzL6/ v8tEGYvHywtKt7ep+RH6GZgc2SjiFe1abN8KPydTrcWxmWsJRJF2nNkE05rOd+u8 LH6EVZ9FOLvmvUJQ8PC5Y/YB9WIRBcFC85I3hBK3md7DaiWKxz61EQoWMkBvnTmL +NgOCMDeEik659YZF7l4NGlXcDlrPuvBArwj9ViycxDpVCCafDy/fygvFoRb/jsq wYYWw+yQpg91YpyTGxvsrA== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:33 +0900 Subject: [PATCH v2 05/12] cmd646: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-5-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092781243154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/ide/cmd646.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 2a59516a9ddb..ea4d501c5e40 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -302,17 +302,6 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Err= or **errp) } } =20 -static void pci_cmd646_ide_exitfn(PCIDevice *dev) -{ - PCIIDEState *d =3D PCI_IDE(dev); - unsigned i; - - for (i =3D 0; i < 2; ++i) { - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].extra_io); - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].addr_iopor= t); - } -} - static const Property cmd646_ide_properties[] =3D { DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0), }; @@ -325,7 +314,6 @@ static void cmd646_ide_class_init(ObjectClass *klass, c= onst void *data) device_class_set_legacy_reset(dc, cmd646_reset); dc->vmsd =3D &vmstate_ide_pci; k->realize =3D pci_cmd646_ide_realize; - k->exit =3D pci_cmd646_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_CMD; k->device_id =3D PCI_DEVICE_ID_CMD_646; k->revision =3D 0x07; --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092851914366.17534861118975; Fri, 10 Oct 2025 03:40:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AXT-0005oR-H0; Fri, 10 Oct 2025 06:39:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AXR-0005j1-DF; Fri, 10 Oct 2025 06:39:53 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AXJ-00073Y-Qv; Fri, 10 Oct 2025 06:39:52 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSY065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:44 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=iiyInnSiBdFW+yfPCMju2JfXG3ua48WG78dciSW5cd4=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092604; v=1; b=DlOM/NCF2AGDOufJ0WcOdzX1wmc5fiPw/erxdOFG4p1PxPpo/nRibCN4LS6EnWRg 7YT1NoziFtx72d7+I5CNVuDCNIwezNLeazXbolqhdPv3HemAZ6vGTwyKKjys7Eir b6hUq/9ONepBKXJpYZGoyPN+77LkL/2DgoMuYjyV0mDDwAaODzVecsMyDydeCgEu e150H6FwV9EfVrOaGaVifFxzj+0IvoIXP9VWR2RhSzCA21AjMxfYoQwlz9cn4GWh bkP0X03g+rIlnJDLUS0wWLrf14v/Hu/XNjlmKee1Abr1Pu27Hh/N/r+ct32scPD6 /MbP8Sr3xuLetUFPOpFWFw== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:34 +0900 Subject: [PATCH v2 06/12] hw/ide/piix: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-6-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092853641154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/ide/piix.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index a0f2709c6973..138f8e1936b4 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -166,17 +166,6 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error= **errp) } } =20 -static void pci_piix_ide_exitfn(PCIDevice *dev) -{ - PCIIDEState *d =3D PCI_IDE(dev); - unsigned i; - - for (i =3D 0; i < 2; ++i) { - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].extra_io); - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].addr_iopor= t); - } -} - /* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ static void piix3_ide_class_init(ObjectClass *klass, const void *data) { @@ -186,7 +175,6 @@ static void piix3_ide_class_init(ObjectClass *klass, co= nst void *data) device_class_set_legacy_reset(dc, piix_ide_reset); dc->vmsd =3D &vmstate_ide_pci; k->realize =3D pci_piix_ide_realize; - k->exit =3D pci_piix_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_INTEL; k->device_id =3D PCI_DEVICE_ID_INTEL_82371SB_1; k->class_id =3D PCI_CLASS_STORAGE_IDE; @@ -209,7 +197,6 @@ static void piix4_ide_class_init(ObjectClass *klass, co= nst void *data) device_class_set_legacy_reset(dc, piix_ide_reset); dc->vmsd =3D &vmstate_ide_pci; k->realize =3D pci_piix_ide_realize; - k->exit =3D pci_piix_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_INTEL; k->device_id =3D PCI_DEVICE_ID_INTEL_82371AB; k->class_id =3D PCI_CLASS_STORAGE_IDE; --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17600927673631003.515194643063; Fri, 10 Oct 2025 03:39:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AVe-0002xN-Sv; Fri, 10 Oct 2025 06:38:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVd-0002wD-6a; Fri, 10 Oct 2025 06:38:01 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVM-0006sU-4d; Fri, 10 Oct 2025 06:37:59 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSZ065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:44 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=N6KvdcMXa6qsZ06cdDLF8MQ7k2CfW5mVvMJOUaALk2A=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092605; v=1; b=X8PPMq0xCHZIS1VdksljQCoIc09bGeA5sFgX0BoK4fqrNkTmD3rrDQumWfEpY4HO otKojbtgPFcNQ7G6lWhEX24n/GTykSvCVCPgImNJE5fIq3GMzTHflqxa+5JSvZrv LyLAFEhPOAJwUcOSxWbtNGO2TcDsHrJE0zEt7o+jWC0fY68fGU+TlsmoUJtGR5GQ claW5MrBnplQ44fQE4OQcDL08fZVM4bfRsXmEhAeq3Y/078pOPmy/iv9VVJl9a2L MXbVyd5bMM3JceOCtdIFzkYukXofQA/sWKI8+dyWxlk7EgB5fQE0o0PYP6xES4rU YqaUiaN0Nn8AZqrT7KisPQ== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:35 +0900 Subject: [PATCH v2 07/12] hw/ide/via: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-7-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092769512154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/ide/via.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index dedc2674c002..cbaf4ad1548b 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -234,17 +234,6 @@ static void via_ide_realize(PCIDevice *dev, Error **er= rp) } } =20 -static void via_ide_exitfn(PCIDevice *dev) -{ - PCIIDEState *d =3D PCI_IDE(dev); - unsigned i; - - for (i =3D 0; i < ARRAY_SIZE(d->bmdma); ++i) { - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].extra_io); - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].addr_iopor= t); - } -} - static void via_ide_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); @@ -258,7 +247,6 @@ static void via_ide_class_init(ObjectClass *klass, cons= t void *data) k->config_read =3D via_ide_cfg_read; k->config_write =3D via_ide_cfg_write; k->realize =3D via_ide_realize; - k->exit =3D via_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_VIA; k->device_id =3D PCI_DEVICE_ID_VIA_IDE; k->revision =3D 0x06; --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092808302243.23039529200184; Fri, 10 Oct 2025 03:40:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AVb-0002uU-Ed; Fri, 10 Oct 2025 06:37:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVW-0002rf-Q6; Fri, 10 Oct 2025 06:37:55 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVK-0006sY-Di; Fri, 10 Oct 2025 06:37:54 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSa065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:45 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=JqOFob/hjsl8tGmhUOdu2E4ECDxoUWEB5usb6X7rGvA=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092605; v=1; b=vLjEYl+8CM3p9gdkGEKRGZL83kzABZequYhx7vTT0kteo6WcxRR+cokjQxy/tqX1 L+1VeK9K7t8xYeuUXyPV8Gt8qSO684hE6GiqU4cNv6w+Sg760tQt/iVC3qlM0WbX V+v5jGiisrp4Jal3wZR+fokeEXlk5bVWGfXqBnGyexEIXZCGSJX3FHmPPfpzShYs M68MlaAsNl2eDkc9Mc3AjZ3v9NTaSGOR2xk7v2pyEKTiD9jX0OsuN5qDlsrPEQDg qas1NFI9oFsg8uVFJ5q+YbNv0EPfk42bfMiyltfxyvJ23s2tHJYj2wxo4a08Z5Ob WLgZZULrbUmYvOVjA4mqDw== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:36 +0900 Subject: [PATCH v2 08/12] hw/nvme: Do not delete the subregion MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-8-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092811495154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/nvme/ctrl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index cd81f7399754..8de3b04f650c 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -9054,8 +9054,6 @@ static void nvme_exit(PCIDevice *pci_dev) } else { msix_uninit(pci_dev, &n->bar0, &n->bar0); } - - memory_region_del_subregion(&n->bar0, &n->iomem); } =20 static const Property nvme_props[] =3D { --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760093018838572.2262238023907; Fri, 10 Oct 2025 03:43:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AaE-0001JQ-7E; Fri, 10 Oct 2025 06:42:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AaB-0001GX-Qs; Fri, 10 Oct 2025 06:42:43 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7Aa7-0007am-Sk; Fri, 10 Oct 2025 06:42:42 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSb065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:45 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=77yV9fYbXC5pzBNX3eGAOmBVD/+cfEjFUpOr2dKNlEY=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092606; v=1; b=Mjx8pti/hT9j4javu08WKSV4r+2Ad3+i/NXM3NiDY9OW7WJSEDvk0Y9BGfjKw3T4 eyiPU0uw5JwqiEoz53f/WI4MWjtQUe3617i2U0aAGbhw4633ePzHG6mVRYvIaYM5 am450eyHk1D8f9AzWN/RVWAPg6GDKlUVLLFBX4pCnmkad2tAFaWbGRkyz/QXIDRY jXE71a9F0HaFYMrFHUQ52mi4aEqiZxq/N11b/1Dhh05Q/WNvwFag0NncaKMP67F3 bgk+3rpom3A15EwpR0yVpnmzgGRYtfPbALmN7rBVlD/L9fuiIO8DIwVB64U+BQY7 YfZRaniyCZoLSRyFRy8oOA== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:37 +0900 Subject: [PATCH v2 09/12] pci: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-9-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760093023373158500 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/pci/pci.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index acc03fd4707c..63e4e49b7e1b 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1190,10 +1190,6 @@ static void do_pci_unregister_device(PCIDevice *pci_= dev) if (xen_mode =3D=3D XEN_EMULATE) { xen_evtchn_remove_pci_device(pci_dev); } - if (memory_region_is_mapped(&pci_dev->bus_master_enable_region)) { - memory_region_del_subregion(&pci_dev->bus_master_container_region, - &pci_dev->bus_master_enable_region); - } address_space_destroy(&pci_dev->bus_master_as); } =20 @@ -1419,27 +1415,11 @@ static PCIDevice *do_pci_register_device(PCIDevice = *pci_dev, return pci_dev; } =20 -static void pci_unregister_io_regions(PCIDevice *pci_dev) -{ - PCIIORegion *r; - int i; - - for(i =3D 0; i < PCI_NUM_REGIONS; i++) { - r =3D &pci_dev->io_regions[i]; - if (!r->size || r->addr =3D=3D PCI_BAR_UNMAPPED) - continue; - memory_region_del_subregion(r->address_space, r->memory); - } - - pci_unregister_vga(pci_dev); -} - static void pci_qdev_unrealize(DeviceState *dev) { PCIDevice *pci_dev =3D PCI_DEVICE(dev); PCIDeviceClass *pc =3D PCI_DEVICE_GET_CLASS(pci_dev); =20 - pci_unregister_io_regions(pci_dev); pci_del_option_rom(pci_dev); pcie_sriov_unregister_device(pci_dev); =20 --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17600929791136.160492668135589; Fri, 10 Oct 2025 03:42:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AaC-0001GW-S8; Fri, 10 Oct 2025 06:42:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7Aa9-0001FI-6l; Fri, 10 Oct 2025 06:42:41 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7Aa6-0007ap-1l; Fri, 10 Oct 2025 06:42:40 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSc065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:46 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=BYxkSfwrSpmy7Ne/555FnmwBpew97gIRZUfu1KFJXjs=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092606; v=1; b=U6007icUfLes67qlidY2xSsWBtCDzyNvQ05bTf+wwUwkFfwLsvHr8AAINAR1kun4 aIarixJpNxC3pjGHCOHoO0atb7w2uW/zVlTENgjcc9LfZjetAti/GOX37d0Eikkm jhdTHoDlhV2YHKqfTtS+zFjXh+MqzinJqT5FBKE5EOrRj4qPX5gSrWuPNSqlyEYC Ir/TkIGOGoALmreo6xmAUOYW5xEBsOQNaz3/5jHG0Tqg5F7cs9mZWEPX2AaaKojN 1dgREw2x7Xulqy35NOYEN0DUu3Yzf4ZfDMOFlVeuO+OqJzuptskUINN6TwuTa/91 AVRFnJI477HhjhJj7pdEKQ== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:38 +0900 Subject: [PATCH v2 10/12] hw/ppc/spapr_pci: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-10-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092987998158500 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/ppc/spapr_pci.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index f9095552e865..0c3df3189da5 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1734,27 +1734,13 @@ static void spapr_phb_unrealize(DeviceState *dev) SysBusDevice *s =3D SYS_BUS_DEVICE(dev); PCIHostState *phb =3D PCI_HOST_BRIDGE(s); SpaprPhbState *sphb =3D SPAPR_PCI_HOST_BRIDGE(phb); - SpaprTceTable *tcet; int i; - const unsigned windows_supported =3D spapr_phb_windows_supported(sphb); =20 if (sphb->msi) { g_hash_table_unref(sphb->msi); sphb->msi =3D NULL; } =20 - /* - * Remove IO/MMIO subregions and aliases, rest should get cleaned - * via PHB's unrealize->object_finalize - */ - for (i =3D windows_supported - 1; i >=3D 0; i--) { - tcet =3D spapr_tce_find_by_liobn(sphb->dma_liobn[i]); - if (tcet) { - memory_region_del_subregion(&sphb->iommu_root, - spapr_tce_get_iommu(tcet)); - } - } - remove_drcs(sphb, phb->bus); =20 for (i =3D PCI_NUM_PINS - 1; i >=3D 0; i--) { @@ -1766,8 +1752,6 @@ static void spapr_phb_unrealize(DeviceState *dev) =20 QLIST_REMOVE(sphb, list); =20 - memory_region_del_subregion(&sphb->iommu_root, &sphb->msiwindow); - /* * An attached PCI device may have memory listeners, eg. VFIO PCI. We = have * unmapped all sections. Remove the listeners now, before destroying = the @@ -1778,12 +1762,6 @@ static void spapr_phb_unrealize(DeviceState *dev) =20 qbus_set_hotplug_handler(BUS(phb->bus), NULL); pci_unregister_root_bus(phb->bus); - - memory_region_del_subregion(get_system_memory(), &sphb->iowindow); - if (sphb->mem64_win_pciaddr !=3D (hwaddr)-1) { - memory_region_del_subregion(get_system_memory(), &sphb->mem64windo= w); - } - memory_region_del_subregion(get_system_memory(), &sphb->mem32window); } =20 static void spapr_phb_destroy_msi(gpointer opaque) --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092767344293.3824333152743; Fri, 10 Oct 2025 03:39:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AVX-0002rv-Md; Fri, 10 Oct 2025 06:37:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVT-0002pP-76; Fri, 10 Oct 2025 06:37:51 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AVL-0006sL-5W; Fri, 10 Oct 2025 06:37:49 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSd065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:46 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=F0AyM/lua4p28w0QtF6/Ku3cctKLYXgOBYs6U3KWbds=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092607; v=1; b=sk0m9MtpFdPqIsbZw2aWD+b7Frj6I4P++MNRQXm0vNjJLwaJYEFPTedDP8kPiT+9 Fzsoh/3WjsmVvGZJ4bO+5dsyiPf0hHXE48ce8UpgEOJLqgHJOzOXtAx6905GiuIt hTsolJqixDwYrv9dyZ9uKbAkef1OEteb+8IwtoMJYDu6mEg5lxkY5d2qsa59voOo kkL6qojYLvL+U9Ze20SJwx1RzJA06TsOoMJisiYudSK+g8O6dofs7K+AcX5ggEUs htEt9zsOELtmbPLvmdC19CxMuwrI2NguBvPY7XHULDVkxLsM1cK0cEHZOLQXMQ0R Syjl7sg9kHZV4gzfIEbLGg== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:39 +0900 Subject: [PATCH v2 11/12] hw/usb/hcd-ehci: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-11-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092769523154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/usb/hcd-ehci.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index b090f253656b..21c3501455b5 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2557,10 +2557,6 @@ void usb_ehci_unrealize(EHCIState *s, DeviceState *d= ev) ehci_queues_rip_all(s, 0); ehci_queues_rip_all(s, 1); =20 - memory_region_del_subregion(&s->mem, &s->mem_caps); - memory_region_del_subregion(&s->mem, &s->mem_opreg); - memory_region_del_subregion(&s->mem, &s->mem_ports); - usb_bus_release(&s->bus); =20 if (s->vmstate) { --=20 2.51.0 From nobody Fri Nov 14 18:23:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760092813572799.1322167894245; Fri, 10 Oct 2025 03:40:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v7AXA-0004nH-9O; Fri, 10 Oct 2025 06:39:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AX7-0004fu-S9; Fri, 10 Oct 2025 06:39:33 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v7AX2-00072I-4r; Fri, 10 Oct 2025 06:39:33 -0400 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 59AAaVSe065199 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 19:36:47 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=POdHoCg5/LDRfXqqwG2wxEKm9Lch4GRRuKLv3lF9UqQ=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760092607; v=1; b=omWHPnB0kq/HsZeLCV9201g//O7pESlMmKNQVAuFVdHJqzrokmRHvwFBsFx025tJ rVhAW/HbNUh7rJIeuC68dIQ2YVvRW9mjZiGNtYAPaOaRSPKqCYwc7I4gWj1FMgNQ nFWBkDC04ZVWOufnynP1t1BVyfFhmOrZE7dgT16PfFMVmJJAfQsjH6+hzDzkLRsP HXWChVgESyX4icQehaKFmIQS6+aJfRjgN6qYVVOpPiPzAWDQHQ36F/r7mu/aNCms U2jlZMnfvght/LWe6htOy409jEQajuK2JyD+xeFE1Iz4zTcjlni37eUgChHi21cp 5N91WqbvzsfDhOViZ7v3Yg== From: Akihiko Odaki Date: Fri, 10 Oct 2025 19:35:40 +0900 Subject: [PATCH v2 12/12] hw/usb/hcd-xhci: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-subregion-v2-12-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> References: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20251010-subregion-v2-0-435a472bc9cd@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Helge Deller , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , John Snow , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Jesper Devantier , Marcel Apfelbaum , Nicholas Piggin , qemu-ppc@nongnu.org, John Levon , Thanos Makatos , Yanan Wang , BALATON Zoltan , Jiaxun Yang , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , =?utf-8?q?Alex_Benn=C3=A9e?= , Fabiano Rosas , Thomas Huth , Laurent Vivier , Peter Maydell , Aurelien Jarno , Aleksandar Rikalo , Max Filippov , =?utf-8?q?Herv=C3=A9_Poussineau?= , Mark Cave-Ayland , Artyom Tarasenko , Akihiko Odaki X-Mailer: b4 0.15-dev-179e8 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=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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-ZM-MESSAGEID: 1760092815226154100 It is no longer necessary. Signed-off-by: Akihiko Odaki --- hw/usb/hcd-xhci.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 292c378bfc98..b68a2aec3171 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3454,16 +3454,6 @@ static void usb_xhci_unrealize(DeviceState *dev) xhci->mfwrap_timer =3D NULL; } =20 - memory_region_del_subregion(&xhci->mem, &xhci->mem_cap); - memory_region_del_subregion(&xhci->mem, &xhci->mem_oper); - memory_region_del_subregion(&xhci->mem, &xhci->mem_runtime); - memory_region_del_subregion(&xhci->mem, &xhci->mem_doorbell); - - for (i =3D 0; i < xhci->numports; i++) { - XHCIPort *port =3D &xhci->ports[i]; - memory_region_del_subregion(&xhci->mem, &port->mem); - } - usb_bus_release(&xhci->bus); } =20 --=20 2.51.0