From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBC44606A31A for ; Mon, 30 Nov 2026 22:48:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=shazbot.org header.i=@shazbot.org header.a=rsa-sha256 header.s=fm3 header.b=Q92lL3xu; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=wfraENz1 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xYA9n-0006fR-Qa; Mon, 30 Nov 2026 17:47:35 -0500 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 1xYA9j-0006ey-G4 for qemu-devel@nongnu.org; Mon, 30 Nov 2026 17:47:32 -0500 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xYA9g-0003Zw-M1 for qemu-devel@nongnu.org; Mon, 30 Nov 2026 17:47:31 -0500 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 8E66C1D00522 for ; Mon, 30 Nov 2026 17:47:27 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 30 Nov 2026 17:47:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shazbot.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1796078847; x=1796165247; bh=3Cp135HZE8KQ1S8rx74Py/ivzlPFf6ekQ+k9GUj15q4=; b= Q92lL3xuVO9sgK5WWF7lBnihloFaVXfIUvptQ0gMUuh8HbLyUyw+KXL+OQ7Dp0fG MLxLXYYjNIjwWrRCgbx9QZAxeIZIKGkBe3HTutike09SXW2RvWF2K1Gaa+471bc4 TiVylkfdGSze/r1RVQ7QP1WWpKPR/u5MM4eGMz6iVPebpl40R/897trcD/R+ZUbw +/pl1fYdBTpot85Wl+NFvkYtecuJt509cDYA+nTk8YmGVE6na0vFLtA4VrrH71nu d3MmoucmEMiGr0bueLn+L3bLY5LUytyDwIep2Je+FcedT8SDsZUW/IcvfCHjKkRa P9af1nXUY+4yw2YU8bei+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1796078847; x= 1796165247; bh=3Cp135HZE8KQ1S8rx74Py/ivzlPFf6ekQ+k9GUj15q4=; b=w fraENz1Q5zA4MH1uZeCyzH6HhWrctJrEGeweZG64n7EfPDZ404xExnnWLfu0JvKI EmTVX8dcaPaWPJikv6JzUyfXO8ERlvfrhhJgmFKoXrPhT7H3ipXEpeska7+9iElm NCpvye7lKAdj2boaDoL5i9+gkBVJJg4xMmczipXfl/Rabr7OtodVMIwrBXykP3zi nDpoxPF2JPXtOX+nEwPUX37mFIzXltwRkCqfNbSED+0MBoF0wsWSfzdiRHxaVEmg gY10BK6dEwN7Bd2Nqjz988EAkj9oMB7ceh+niMmVduBaDcQvGvwoSHT5R1Q8iPhL j/81Hi+TntrPVZK/9wD2Q== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=shazbot.org a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796078847; d=shazbot.org; mf=PGFsZXhAc2hhemJvdC5vcmc+; rt=PHFlbXUtZGV2ZWxAbm9uZ251Lm9yZz4=; s=fm3:rsa-sha256:A/6EUw3pqJO+MxdfB06mIjVV66/S+ZlR0yJWHm3YNNURUno A7kKv2cBC1FqOlsMItPZQFaxS/VpWikRqw6ropwC0bEp9youfiAaCtqK64Xx4qts Apn2lLqxApSUVQtC2RBk06qkwLEsP32Mx9nHprKnPzzBZbQs5HcBvqPXGnLRJ1Ih j1hrbJdUVMnaYm4tcqpv8ijk7itmg2gCbPk+vAOLlqQsQloDCUsPiRREyoOcnbwz tAONgUyjVem2yI3VIjsfmUsYdigCZ+Sea6rS6QoHI3cdeStTCqevMD4DCrZmWpjm QMhiWRDAr6ZS8fTLfMUTB/8wZjFctogRWSFqwdg==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-transfer-encoding,content-type,date,feedback-id, from,in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:vBa++A5PdhMjlO/Tr3DRRAZ4Tn0juOgfpsatmDUDkqc=:sd083ocKHdoPiiEbVuhPRmiVe8emEfQ/5EpN2vyXXtU=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGuM+ADuWsr6WiJIv2utm2On2RTPywzyIS2qxFryc+ADn69Fpg0bOmg3Ayghahf5H xfwBhQPtB/brz7hz7hrYl/WoPakKUqe3LFd4UsdSLfV1u6lDJvBSItUkjG2veoh/h3fxVb FY0720VV6xF+40FcUphTEpGsZqt3YAsFbcJb1H2mtCl3uOYYgKVDIjFFyEFERv/EgJ7WB2 HReLM2FqmslP9r4wR7q2zsuZZy6H+Gkh2QEoU+SAQON03rxVDtiZ5GmaCb/+obD1qWMfHP tb+ohFNys0VcJgY0lho/HEox3iAk4ccNw8XDe0IVKkT2AQF9R9+uY4NI6JYi2+Td929CW7 Zsg+aEASvv5gkfJnRO9P24Tr5S9vzru5sEyEWi2yF2d3jbi/vACOPI8IapQNcVu5QrsE5j V0kbIsHveSxdNcu5ZyC1jzgSTB+k2tmC0bXNOHD/hZ+9Uo/zdNEmmTfoHxay4wL9kcroXM Xdw2Y2XEVGKCyw2kiSUANEVpvMHsctLeuz2jyPjSEZGnd9i5rpApvVLHEJRESPxo5sL7c4 OCzzjiI+4UX6Jy1GVcis/paizk7w+77NrI4m3aavz9Zu8oWRioZsZcVcJTt6UnbxPUjQL1 DHU/nfKaW1T+Cm0wmeTn9heOZ/ZKU03oUOFFxlvHyzb8TKfmj9b5oV6J0BUQ X-ME-Proxy: Feedback-ID: i03f14258:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Nov 2026 17:47:26 -0500 (EST) Date: Mon, 30 Nov 2026 15:47:25 -0700 From: Alex Williamson To: =?UTF-8?B?Q8OpZHJpYw==?= Le Goater Cc: qemu-devel@nongnu.org, alex@shazbot.org Subject: Re: [PATCH for-12.0 3/9] vfio/pci: Rename IRQ functions Message-ID: <20261130154725.4e0a2f7a@shazbot.org> In-Reply-To: <20261109090625.908592-4-clg@redhat.com> References: <20261109090625.908592-1-clg@redhat.com> <20261109090625.908592-4-clg@redhat.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=202.12.124.146; envelope-from=alex@shazbot.org; helo=fout-b3-smtp.messagingengine.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Mon, 9 Nov 2026 10:06:19 +0100 C=C3=A9dric Le Goater wrote: > Normalize IRQ function names to a consistent vfio_pci_*_verb pattern: >=20 > vfio_pci_interrupt_setup -> vfio_pci_irq_setup > vfio_disable_interrupts -> vfio_pci_irq_disable > vfio_intx_enable -> vfio_pci_intx_enable > vfio_intx_disable -> vfio_pci_intx_disable > vfio_pci_vector_init -> vfio_pci_msi_vector_use > vfio_msi_setup -> vfio_pci_msi_setup > vfio_msi_enable -> vfio_pci_msi_enable > vfio_msi_disable -> vfio_pci_msi_disable > vfio_update_msi -> vfio_pci_msi_update > vfio_pci_teardown_msi -> vfio_pci_msi_teardown I think this one was named differently because it does both MSI and MSI-X teardown. It's not an exact opposite of vfio_pci_msi_setup as might be inferred from the new name. Thanks, Alex > vfio_msix_early_setup -> vfio_pci_msix_early_setup > vfio_msix_setup -> vfio_pci_msix_setup > vfio_msix_enable -> vfio_pci_msix_enable > vfio_msix_disable -> vfio_pci_msix_disable > vfio_unregister_err_notifier -> vfio_pci_unregister_err_notifier > vfio_unregister_req_notifier -> vfio_pci_unregister_req_notifier >=20 > Drop the vfio_pci_intx_enable() wrapper that called vfio_intx_enable() > and reorder the declarations in pci.h. >=20 > No functional change. >=20 > Signed-off-by: C=C3=A9dric Le Goater > --- > hw/vfio/pci.h | 45 ++++++++++++++++++---------------- > hw/vfio-user/pci.c | 4 +-- > hw/vfio/cpr.c | 2 +- > hw/vfio/pci-irq.c | 61 +++++++++++++++++++++------------------------- > hw/vfio/pci.c | 38 ++++++++++++++--------------- > 5 files changed, 74 insertions(+), 76 deletions(-) >=20 > diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h > index 3315fb4fbceb..184df22b6e67 100644 > --- a/hw/vfio/pci.h > +++ b/hw/vfio/pci.h > @@ -212,29 +212,32 @@ static inline bool vfio_is_base_display(VFIOPCIDevi= ce *vdev) > } > =20 > /* MSI/MSI-X/INTx */ > -void vfio_pci_vector_init(VFIOPCIDevice *vdev, int nr); > +bool vfio_pci_irq_setup(VFIOPCIDevice *vdev, Error **errp); > +void vfio_pci_irq_disable(VFIOPCIDevice *vdev); > + > +bool vfio_pci_intx_enable(VFIOPCIDevice *vdev, Error **errp); > +void vfio_pci_intx_disable(VFIOPCIDevice *vdev); > +void vfio_pci_intx_eoi(VFIODevice *vbasedev); > +void vfio_pci_intx_set_handler(VFIOPCIDevice *vdev, bool enable); > + > +bool vfio_pci_msi_setup(VFIOPCIDevice *vdev, int pos, Error **errp); > +void vfio_pci_msi_vector_use(VFIOPCIDevice *vdev, int nr); > +void vfio_pci_msi_enable(VFIOPCIDevice *vdev); > +void vfio_pci_msi_disable(VFIOPCIDevice *vdev); > +void vfio_pci_msi_update(VFIOPCIDevice *vdev); > +void vfio_pci_msi_set_handler(VFIOPCIDevice *vdev, int nr, bool enable); > +void vfio_pci_msi_teardown(VFIOPCIDevice *vdev); > + > +bool vfio_pci_msix_early_setup(VFIOPCIDevice *vdev, Error **errp); > +bool vfio_pci_msix_setup(VFIOPCIDevice *vdev, int pos, Error **errp); > +void vfio_pci_msix_enable(VFIOPCIDevice *vdev); > +void vfio_pci_msix_disable(VFIOPCIDevice *vdev); > +void vfio_pci_msix_set_notifiers(VFIOPCIDevice *vdev); > + > void vfio_pci_add_kvm_msi_virq(VFIOPCIDevice *vdev, VFIOMSIVector *vecto= r, > int vector_n, bool msix); > void vfio_pci_prepare_kvm_msi_virq_batch(VFIOPCIDevice *vdev); > void vfio_pci_commit_kvm_msi_virq_batch(VFIOPCIDevice *vdev); > -bool vfio_pci_intx_enable(VFIOPCIDevice *vdev, Error **errp); > -void vfio_pci_intx_set_handler(VFIOPCIDevice *vdev, bool enable); > -void vfio_pci_msix_set_notifiers(VFIOPCIDevice *vdev); > -void vfio_pci_msi_set_handler(VFIOPCIDevice *vdev, int nr, bool enable); > -void vfio_disable_interrupts(VFIOPCIDevice *vdev); > -bool vfio_intx_enable(VFIOPCIDevice *vdev, Error **errp); > -void vfio_intx_disable(VFIOPCIDevice *vdev); > -void vfio_msi_enable(VFIOPCIDevice *vdev); > -void vfio_msi_disable(VFIOPCIDevice *vdev); > -void vfio_msix_enable(VFIOPCIDevice *vdev); > -void vfio_msix_disable(VFIOPCIDevice *vdev); > -void vfio_update_msi(VFIOPCIDevice *vdev); > -bool vfio_msix_early_setup(VFIOPCIDevice *vdev, Error **errp); > -bool vfio_msi_setup(VFIOPCIDevice *vdev, int pos, Error **errp); > -bool vfio_msix_setup(VFIOPCIDevice *vdev, int pos, Error **errp); > -bool vfio_pci_interrupt_setup(VFIOPCIDevice *vdev, Error **errp); > -void vfio_pci_intx_eoi(VFIODevice *vbasedev); > -void vfio_pci_teardown_msi(VFIOPCIDevice *vdev); > =20 > /* Config space */ > int vfio_pci_config_space_read(VFIOPCIDevice *vdev, off_t offset, > @@ -301,9 +304,9 @@ extern const VMStateDescription vfio_display_vmstate; > =20 > /* Notifiers */ > void vfio_pci_register_err_notifier(VFIOPCIDevice *vdev); > -void vfio_unregister_err_notifier(VFIOPCIDevice *vdev); > +void vfio_pci_unregister_err_notifier(VFIOPCIDevice *vdev); > void vfio_pci_register_req_notifier(VFIOPCIDevice *vdev); > -void vfio_unregister_req_notifier(VFIOPCIDevice *vdev); > +void vfio_pci_unregister_req_notifier(VFIOPCIDevice *vdev); > =20 > /** > * vfio_pci_from_vfio_device: Transform from VFIODevice to > diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c > index c749ff149f8a..2a66500c1e6d 100644 > --- a/hw/vfio-user/pci.c > +++ b/hw/vfio-user/pci.c > @@ -345,7 +345,7 @@ static void vfio_user_pci_realize(PCIDevice *pdev, Er= ror **errp) > vfio_user_msix_setup(vdev); > } > =20 > - if (!vfio_pci_interrupt_setup(vdev, errp)) { > + if (!vfio_pci_irq_setup(vdev, errp)) { > goto out_teardown; > } > =20 > @@ -355,7 +355,7 @@ static void vfio_user_pci_realize(PCIDevice *pdev, Er= ror **errp) > return; > =20 > out_teardown: > - vfio_pci_teardown_msi(vdev); > + vfio_pci_msi_teardown(vdev); > vfio_pci_bars_exit(vdev); > error: > error_prepend(errp, VFIO_MSG_PREFIX, vdev->vbasedev.name); > diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c > index 6e1659dcddc1..3c1304781d76 100644 > --- a/hw/vfio/cpr.c > +++ b/hw/vfio/cpr.c > @@ -69,7 +69,7 @@ static void vfio_cpr_claim_vectors(VFIOPCIDevice *vdev,= int nr_vectors, > =20 > fd =3D vfio_cpr_load_vector_fd(vdev, "interrupt", i); > if (fd >=3D 0) { > - vfio_pci_vector_init(vdev, i); > + vfio_pci_msi_vector_use(vdev, i); > vfio_pci_msi_set_handler(vdev, i, true); > } > =20 > diff --git a/hw/vfio/pci-irq.c b/hw/vfio/pci-irq.c > index 2b2a118b130a..62b0e9a64d90 100644 > --- a/hw/vfio/pci-irq.c > +++ b/hw/vfio/pci-irq.c > @@ -301,7 +301,7 @@ static void vfio_irqchip_change(Notifier *notify, voi= d *data) > vfio_intx_update(vdev, &vdev->intx.route); > } > =20 > -bool vfio_intx_enable(VFIOPCIDevice *vdev, Error **errp) > +bool vfio_pci_intx_enable(VFIOPCIDevice *vdev, Error **errp) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > uint32_t val =3D vfio_pci_read_config(pdev, PCI_INTERRUPT_PIN, 1); > @@ -329,7 +329,7 @@ bool vfio_intx_enable(VFIOPCIDevice *vdev, Error **er= rp) > * The incoming state is cleared thereafter. > */ > if (!cpr_is_incoming()) { > - vfio_disable_interrupts(vdev); > + vfio_pci_irq_disable(vdev); > } > =20 > vdev->intx.pin =3D pin - 1; /* Pin A (1) -> irq[0] */ > @@ -377,7 +377,7 @@ skip_signaling: > return true; > } > =20 > -void vfio_intx_disable(VFIOPCIDevice *vdev) > +void vfio_pci_intx_disable(VFIOPCIDevice *vdev) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > int fd; > @@ -400,11 +400,6 @@ void vfio_intx_disable(VFIOPCIDevice *vdev) > trace_vfio_intx_disable(vdev->vbasedev.name); > } > =20 > -bool vfio_pci_intx_enable(VFIOPCIDevice *vdev, Error **errp) > -{ > - return vfio_intx_enable(vdev, errp); > -} > - > void vfio_pci_intx_set_handler(VFIOPCIDevice *vdev, bool enable) > { > int fd =3D event_notifier_get_fd(&vdev->intx.interrupt); > @@ -629,7 +624,7 @@ static void set_irq_signalling(VFIODevice *vbasedev, = VFIOMSIVector *vector, > } > } > =20 > -void vfio_pci_vector_init(VFIOPCIDevice *vdev, int nr) > +void vfio_pci_msi_vector_use(VFIOPCIDevice *vdev, int nr) > { > VFIOMSIVector *vector =3D &vdev->msi_vectors[nr]; > PCIDevice *pdev =3D PCI_DEVICE(vdev); > @@ -660,7 +655,7 @@ static int vfio_msix_vector_do_use(PCIDevice *pdev, u= nsigned int nr, > vector =3D &vdev->msi_vectors[nr]; > =20 > if (!vector->use) { > - vfio_pci_vector_init(vdev, nr); > + vfio_pci_msi_vector_use(vdev, nr); > } > =20 > qemu_set_fd_handler(event_notifier_get_fd(&vector->interrupt), > @@ -801,12 +796,12 @@ void vfio_pci_commit_kvm_msi_virq_batch(VFIOPCIDevi= ce *vdev) > } > } > =20 > -void vfio_msix_enable(VFIOPCIDevice *vdev) > +void vfio_pci_msix_enable(VFIOPCIDevice *vdev) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > int ret; > =20 > - vfio_disable_interrupts(vdev); > + vfio_pci_irq_disable(vdev); > =20 > vdev->msi_vectors =3D g_new0(VFIOMSIVector, vdev->msix->entries); > =20 > @@ -856,12 +851,12 @@ void vfio_msix_enable(VFIOPCIDevice *vdev) > trace_vfio_msix_enable(vdev->vbasedev.name); > } > =20 > -void vfio_msi_enable(VFIOPCIDevice *vdev) > +void vfio_pci_msi_enable(VFIOPCIDevice *vdev) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > int ret, i; > =20 > - vfio_disable_interrupts(vdev); > + vfio_pci_irq_disable(vdev); > =20 > vdev->nr_vectors =3D msi_nr_vectors_allocated(pdev); > retry: > @@ -954,7 +949,7 @@ static void vfio_msi_disable_common(VFIOPCIDevice *vd= ev) > vdev->interrupt =3D VFIO_INT_NONE; > } > =20 > -void vfio_msix_disable(VFIOPCIDevice *vdev) > +void vfio_pci_msix_disable(VFIOPCIDevice *vdev) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > Error *err =3D NULL; > @@ -975,12 +970,12 @@ void vfio_msix_disable(VFIOPCIDevice *vdev) > =20 > /* > * Always clear MSI-X IRQ index. A PF device could have enabled > - * MSI-X with no vectors. See vfio_msix_enable(). > + * MSI-X with no vectors. See vfio_pci_msix_enable(). > */ > vfio_device_irq_disable(&vdev->vbasedev, VFIO_PCI_MSIX_IRQ_INDEX); > =20 > vfio_msi_disable_common(vdev); > - if (!vfio_intx_enable(vdev, &err)) { > + if (!vfio_pci_intx_enable(vdev, &err)) { > error_reportf_err(err, VFIO_MSG_PREFIX, vdev->vbasedev.name); > } > =20 > @@ -990,13 +985,13 @@ void vfio_msix_disable(VFIOPCIDevice *vdev) > trace_vfio_msix_disable(vdev->vbasedev.name); > } > =20 > -void vfio_msi_disable(VFIOPCIDevice *vdev) > +void vfio_pci_msi_disable(VFIOPCIDevice *vdev) > { > Error *err =3D NULL; > =20 > vfio_device_irq_disable(&vdev->vbasedev, VFIO_PCI_MSI_IRQ_INDEX); > vfio_msi_disable_common(vdev); > - vfio_intx_enable(vdev, &err); > + vfio_pci_intx_enable(vdev, &err); > if (err) { > error_reportf_err(err, VFIO_MSG_PREFIX, vdev->vbasedev.name); > } > @@ -1004,7 +999,7 @@ void vfio_msi_disable(VFIOPCIDevice *vdev) > trace_vfio_msi_disable(vdev->vbasedev.name); > } > =20 > -void vfio_update_msi(VFIOPCIDevice *vdev) > +void vfio_pci_msi_update(VFIOPCIDevice *vdev) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > int i; > @@ -1025,7 +1020,7 @@ void vfio_update_msi(VFIOPCIDevice *vdev) > /* > * Interrupt setup > */ > -void vfio_disable_interrupts(VFIOPCIDevice *vdev) > +void vfio_pci_irq_disable(VFIOPCIDevice *vdev) > { > /* > * More complicated than it looks. Disabling MSI/X transitions the > @@ -1033,17 +1028,17 @@ void vfio_disable_interrupts(VFIOPCIDevice *vdev) > * disable MSI/X and then cleanup by disabling INTx. > */ > if (vdev->interrupt =3D=3D VFIO_INT_MSIX) { > - vfio_msix_disable(vdev); > + vfio_pci_msix_disable(vdev); > } else if (vdev->interrupt =3D=3D VFIO_INT_MSI) { > - vfio_msi_disable(vdev); > + vfio_pci_msi_disable(vdev); > } > =20 > if (vdev->interrupt =3D=3D VFIO_INT_INTx) { > - vfio_intx_disable(vdev); > + vfio_pci_intx_disable(vdev); > } > } > =20 > -bool vfio_msi_setup(VFIOPCIDevice *vdev, int pos, Error **errp) > +bool vfio_pci_msi_setup(VFIOPCIDevice *vdev, int pos, Error **errp) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > uint16_t ctrl; > @@ -1259,7 +1254,7 @@ static bool vfio_pci_relocate_msix(VFIOPCIDevice *v= dev, Error **errp) > * need to first look for where the MSI-X table lives. So we > * unfortunately split MSI-X setup across two functions. > */ > -bool vfio_msix_early_setup(VFIOPCIDevice *vdev, Error **errp) > +bool vfio_pci_msix_early_setup(VFIOPCIDevice *vdev, Error **errp) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > uint8_t pos; > @@ -1367,7 +1362,7 @@ bool vfio_msix_early_setup(VFIOPCIDevice *vdev, Err= or **errp) > return vfio_pci_relocate_msix(vdev, errp); > } > =20 > -bool vfio_msix_setup(VFIOPCIDevice *vdev, int pos, Error **errp) > +bool vfio_pci_msix_setup(VFIOPCIDevice *vdev, int pos, Error **errp) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > int ret; > @@ -1425,7 +1420,7 @@ bool vfio_msix_setup(VFIOPCIDevice *vdev, int pos, = Error **errp) > return true; > } > =20 > -void vfio_pci_teardown_msi(VFIOPCIDevice *vdev) > +void vfio_pci_msi_teardown(VFIOPCIDevice *vdev) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > =20 > @@ -1503,7 +1498,7 @@ void vfio_pci_register_err_notifier(VFIOPCIDevice *= vdev) > } > } > =20 > -void vfio_unregister_err_notifier(VFIOPCIDevice *vdev) > +void vfio_pci_unregister_err_notifier(VFIOPCIDevice *vdev) > { > Error *err =3D NULL; > =20 > @@ -1577,7 +1572,7 @@ void vfio_pci_register_req_notifier(VFIOPCIDevice *= vdev) > } > } > =20 > -void vfio_unregister_req_notifier(VFIOPCIDevice *vdev) > +void vfio_pci_unregister_req_notifier(VFIOPCIDevice *vdev) > { > Error *err =3D NULL; > =20 > @@ -1596,7 +1591,7 @@ void vfio_unregister_req_notifier(VFIOPCIDevice *vd= ev) > vdev->req_enabled =3D false; > } > =20 > -bool vfio_pci_interrupt_setup(VFIOPCIDevice *vdev, Error **errp) > +bool vfio_pci_irq_setup(VFIOPCIDevice *vdev, Error **errp) > { > PCIDevice *pdev =3D PCI_DEVICE(vdev); > =20 > @@ -1620,11 +1615,11 @@ bool vfio_pci_interrupt_setup(VFIOPCIDevice *vdev= , Error **errp) > kvm_irqchip_add_change_notifier(&vdev->irqchip_change_notifier); > =20 > /* > - * During CPR, do not call vfio_intx_enable at this time. Inste= ad, > + * During CPR, do not call vfio_pci_intx_enable at this time. I= nstead, > * call it from vfio_pci_post_load after the intx routing data h= as > * been loaded from vmstate. > */ > - if (!cpr_is_incoming() && !vfio_intx_enable(vdev, errp)) { > + if (!cpr_is_incoming() && !vfio_pci_intx_enable(vdev, errp)) { > timer_free(vdev->intx.mmap_timer); > pci_device_set_intx_routing_notifier(pdev, NULL); > kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_not= ifier); > diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c > index 5fd099695c8e..9a3e960126ea 100644 > --- a/hw/vfio/pci.c > +++ b/hw/vfio/pci.c > @@ -482,13 +482,13 @@ void vfio_pci_write_config(PCIDevice *pdev, > =20 > if (!was_enabled) { > if (is_enabled) { > - vfio_msi_enable(vdev); > + vfio_pci_msi_enable(vdev); > } > } else { > if (!is_enabled) { > - vfio_msi_disable(vdev); > + vfio_pci_msi_disable(vdev); > } else { > - vfio_update_msi(vdev); > + vfio_pci_msi_update(vdev); > } > } > } else if (pdev->cap_present & QEMU_PCI_CAP_MSIX && > @@ -500,9 +500,9 @@ void vfio_pci_write_config(PCIDevice *pdev, > is_enabled =3D msix_enabled(pdev); > =20 > if (!was_enabled && is_enabled) { > - vfio_msix_enable(vdev); > + vfio_pci_msix_enable(vdev); > } else if (was_enabled && !is_enabled) { > - vfio_msix_disable(vdev); > + vfio_pci_msix_disable(vdev); > } > } else if (ranges_overlap(addr, len, PCI_BASE_ADDRESS_0, 24) || > range_covers_byte(addr, len, PCI_COMMAND)) { > @@ -1021,14 +1021,14 @@ static bool vfio_add_std_cap(VFIOPCIDevice *vdev,= uint8_t pos, Error **errp) > =20 > switch (cap_id) { > case PCI_CAP_ID_MSI: > - ret =3D vfio_msi_setup(vdev, pos, errp); > + ret =3D vfio_pci_msi_setup(vdev, pos, errp); > break; > case PCI_CAP_ID_EXP: > vfio_check_pcie_flr(vdev, pos); > ret =3D vfio_setup_pcie_cap(vdev, pos, size, errp); > break; > case PCI_CAP_ID_MSIX: > - ret =3D vfio_msix_setup(vdev, pos, errp); > + ret =3D vfio_pci_msix_setup(vdev, pos, errp); > break; > case PCI_CAP_ID_PM: > vfio_check_pm_reset(vdev, pos); > @@ -1361,7 +1361,7 @@ void vfio_pci_pre_reset(VFIOPCIDevice *vdev) > uint32_t val; > uint16_t cmd; > =20 > - vfio_disable_interrupts(vdev); > + vfio_pci_irq_disable(vdev); > =20 > /* > * Stop any ongoing DMA by disconnecting I/O, MMIO, and bus master. > @@ -1410,7 +1410,7 @@ void vfio_pci_post_reset(VFIOPCIDevice *vdev) > Error *err =3D NULL; > int ret, nr; > =20 > - if (!vfio_intx_enable(vdev, &err)) { > + if (!vfio_pci_intx_enable(vdev, &err)) { > error_reportf_err(err, VFIO_MSG_PREFIX, vdev->vbasedev.name); > } > =20 > @@ -1618,9 +1618,9 @@ static int vfio_pci_load_config(VFIODevice *vbasede= v, QEMUFile *f) > } > =20 > if (msi_enabled(pdev)) { > - vfio_msi_enable(vdev); > + vfio_pci_msi_enable(vdev); > } else if (msix_enabled(pdev)) { > - vfio_msix_enable(vdev); > + vfio_pci_msix_enable(vdev); > } > =20 > return ret; > @@ -1944,7 +1944,7 @@ bool vfio_pci_config_setup(VFIOPCIDevice *vdev, Err= or **errp) > =20 > vfio_bars_prepare(vdev); > =20 > - if (!vfio_msix_early_setup(vdev, errp)) { > + if (!vfio_pci_msix_early_setup(vdev, errp)) { > return false; > } > =20 > @@ -2043,7 +2043,7 @@ static void vfio_pci_realize(PCIDevice *pdev, Error= **errp) > vfio_bar_quirk_setup(vdev, i); > } > =20 > - if (!vfio_pci_interrupt_setup(vdev, errp)) { > + if (!vfio_pci_irq_setup(vdev, errp)) { > goto out_unset_idev; > } > =20 > @@ -2097,7 +2097,7 @@ static void vfio_pci_realize(PCIDevice *pdev, Error= **errp) > out_deregister: > vfio_display_exit(vdev); > if (vdev->interrupt =3D=3D VFIO_INT_INTx) { > - vfio_intx_disable(vdev); > + vfio_pci_intx_disable(vdev); > } > pci_device_set_intx_routing_notifier(pdev, NULL); > if (vdev->irqchip_change_notifier.notify) { > @@ -2111,7 +2111,7 @@ out_unset_idev: > pci_device_unset_iommu_device(pdev); > } > out_teardown: > - vfio_pci_teardown_msi(vdev); > + vfio_pci_msi_teardown(vdev); > vfio_pci_bars_exit(vdev); > error: > error_prepend(errp, VFIO_MSG_PREFIX, vbasedev->name); > @@ -2130,17 +2130,17 @@ static void vfio_exitfn(PCIDevice *pdev) > VFIODevice *vbasedev =3D &vdev->vbasedev; > =20 > vfio_display_exit(vdev); > - vfio_unregister_req_notifier(vdev); > - vfio_unregister_err_notifier(vdev); > + vfio_pci_unregister_req_notifier(vdev); > + vfio_pci_unregister_err_notifier(vdev); > pci_device_set_intx_routing_notifier(pdev, NULL); > if (vdev->irqchip_change_notifier.notify) { > kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifie= r); > } > - vfio_disable_interrupts(vdev); > + vfio_pci_irq_disable(vdev); > if (vdev->intx.mmap_timer) { > timer_free(vdev->intx.mmap_timer); > } > - vfio_pci_teardown_msi(vdev); > + vfio_pci_msi_teardown(vdev); > vfio_pci_disable_rp_atomics(vdev); > vfio_pci_bars_exit(vdev); > vfio_migration_exit(vbasedev);