From nobody Fri Nov 14 18:23:22 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 1760089372346707.2760346015365; Fri, 10 Oct 2025 02:42:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v79dR-0003YU-U6; Fri, 10 Oct 2025 05:42: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 1v79dO-0003Xa-0S; Fri, 10 Oct 2025 05:41:59 -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 1v79dH-0003PF-V2; Fri, 10 Oct 2025 05:41:57 -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 59A9Ydp2047099 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2025 18:34:44 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=x/7uMW3aUb4f+MV1RqbQecUUAkYpXAzDJhCxZDqC39w=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Date:Subject:Message-Id:To; s=rs20250326; t=1760088885; v=1; b=ctrcqZa9svXJFjag7F2MsEOdcgcWiw8mWYMQwHl+dbdpl4wCjKxrDaCH4AJK7wlu RakwnoyWDoVWSBXToxoCkM3yFcp+gk24j0gBBcoD0kk4easlSWOEZantLxbACABn 7mySgHD+b5v902BCWKpeZz73W03erQ5+dCh0x8WpnbMpoIjzgcQa/3IS8o2DwLCz uqGHEoQJQDJNfHdfEOjs8a3HENwMx/0yNmyDY9DMppGX/b8Rius6Itv1Cz9jhajF 29HBbuMbR7GKqMFHNnjxDdepD4oA8BoxnDAMZrFJaVqpDOsvlcTwiNqWHgPZF+W8 9TG+v5gpXc3CZVDaRAjD+Q== From: Akihiko Odaki Date: Fri, 10 Oct 2025 18:34:38 +0900 Subject: [PATCH] vfio-user: Do not delete the subregion MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251010-vfio-v1-1-d7a6056539b7@rsg.ci.i.u-tokyo.ac.jp> X-B4-Tracking: v=1; b=H4sIAC3T6GgC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1NDA0MD3bK0zHzdxDQLY5NU0zRjCwNzJaDSgqLUtMwKsDHRsbW1AGSJjU9 WAAAA X-Change-ID: 20251010-vfio-af834e5f3807 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: 1760089382559158500 Removing the PBA memory region from its container in vfio_user_msix_teardown() is semantically incorrect as the reference to the region is already deleted when the function is called. The operation is unnecessary in the first place since the PCI code removes all BARs during unrealization, so stop removing the PBA memory region in vfio_user_msix_teardown(). Signed-off-by: Akihiko Odaki --- hw/vfio-user/pci.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index b53ed3b456f9..1a3741a29a1a 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -74,12 +74,6 @@ static void vfio_user_msix_setup(VFIOPCIDevice *vdev) =20 static void vfio_user_msix_teardown(VFIOPCIDevice *vdev) { - MemoryRegion *mr, *sub; - - mr =3D vdev->bars[vdev->msix->pba_bar].mr; - sub =3D vdev->msix->pba_region; - memory_region_del_subregion(mr, sub); - g_free(vdev->msix->pba_region); vdev->msix->pba_region =3D NULL; } --- base-commit: 94474a7733a57365d5a27efc28c05462e90e8944 change-id: 20251010-vfio-af834e5f3807 Best regards, -- =20 Akihiko Odaki