From nobody Sun Sep 28 17:12:43 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 1757931335255552.053203094803; Mon, 15 Sep 2025 03:15:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uy6Cy-00050d-47; Mon, 15 Sep 2025 06:13:16 -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 1uy6Cw-0004v0-G1; Mon, 15 Sep 2025 06:13:14 -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 1uy6Cn-0006vt-US; Mon, 15 Sep 2025 06:13:14 -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 58FA8uMP006344 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Sep 2025 19:09:05 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=9xkJspHpPQNQBoWKZvm2Uj1/DqAf0CZcwgKhdBrA1QA=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1757930945; v=1; b=j870JCne3OfNUsYEESLnb/I35Tn+rD9Im4No2J9whV0/zQV7PLvFXaBdSnyW1BsH 6NbHU4t4KZyVVF5GcTUDTZQczOwHYay06PWqn07bXC+EYFl6Hx90W8BwhHUyRMmE D4uCX1cUBTD1Lu3w9v0WsJeA78ouDwFm3GRHJ0+MWbne3qc9Y6t5mljqGbGWcX0f hdoGLuuEP+3GCwgja16o8jHenHxuZhHUqX1Jnx+LdTZ1Lfb1nw4EagrXjFuaMWV+ 0bRI2K9qapOdYXngPny9jLNZ2yeAwqGl8kcr1qTBc1cyPgPJPs4SesLYV3Dlo/S0 bgXOGkKPVM9DknUssmSgxQ== From: Akihiko Odaki Date: Mon, 15 Sep 2025 19:08:53 +0900 Subject: [PATCH v2 12/15] pci: Do not delete the subregions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250915-use-v2-12-f4c7ff13bfe9@rsg.ci.i.u-tokyo.ac.jp> References: <20250915-use-v2-0-f4c7ff13bfe9@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20250915-use-v2-0-f4c7ff13bfe9@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, RCVD_IN_VALIDITY_SAFE_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: 1757931336390116600 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 516029f66cda..2b408c7ec336 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1188,10 +1188,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 @@ -1417,27 +1413,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