From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Chen, Jiqian" <Jiqian.Chen@amd.com>,
"Huang, Ray" <Ray.Huang@amd.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v10 4/4] vpci/msix: Free MSIX resources when init_msix() fails
Date: Wed, 6 Aug 2025 10:07:59 +0200 [thread overview]
Message-ID: <aJMNX2RRum-w0_Mu@macbook.local> (raw)
In-Reply-To: <0c8458ea-9977-4ba9-8668-b09a65cf9172@suse.com>
On Tue, Aug 05, 2025 at 10:40:00AM +0200, Jan Beulich wrote:
> On 05.08.2025 10:27, Chen, Jiqian wrote:
> > On 2025/8/5 16:10, Jan Beulich wrote:
> >> On 05.08.2025 05:49, Jiqian Chen wrote:
> >>> When MSI-X initialization fails vPCI will hide the capability, but
> >>> remove of handlers and data won't be performed until the device is
> >>> deassigned. Introduce a MSI-X cleanup hook that will be called when
> >>> initialization fails to cleanup MSI-X related hooks and free it's
> >>> associated data.
> >>>
> >>> As all supported capabilities have been switched to use the cleanup
> >>> hooks call those from vpci_deassign_device() instead of open-code the
> >>> capability specific cleanup in there.
> >>>
> >>> Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com>
> >>> ---
> >>> cc: "Roger Pau Monné" <roger.pau@citrix.com>
> >>> ---
> >>> v9->v10 changes:
> >>> * Call all cleanup hook in vpci_deassign_device() instead of cleanup_msix().
> >>
> >> Isn't this rather an omission in an earlier change, and hence may want to
> >> come separately and with a Fixes: tag?
> > This is not really an omission, after all, all the cleanup hooks were implemented at the end of this series.
> > And judging from the commit message(which was written by Roger in v8), Roger also agreed to add them in this patch.
>
> I disagree. Of the two xfree()-s you remove here from vpci_deassign_device(),
> one should have been removed by patch 3 already. Which would require the
> part of the patch here to be put in place earlier on.
I don't think a Fixes tag is strictly required - the previous
functionality will not lead to malfunction, albeit it's best to use
the cleanup hooks introduced here. Up until the hooks are executed as
part of vpci_deassign_device() the xfree() calls need to remain in
place.
Conceptually it would have been better to add the calls to the
->cleanup() hooks in vpci_deassign_device() in the same patch that
added the vpci_init_capabilities() ->init() and ->cleanup() logic.
It was my bad for noting this only when reviewing patch 8, and then
not asking for it to be placed in the right patch.
Thanks, Roger.
next prev parent reply other threads:[~2025-08-06 8:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 3:49 [PATCH v10 0/4] Support hiding capability when its initialization fails Jiqian Chen
2025-08-05 3:49 ` [PATCH v10 1/4] vpci: Refactor vpci_remove_register to remove matched registers Jiqian Chen
2025-08-05 3:49 ` [PATCH v10 2/4] vpci/rebar: Free Rebar resources when init_rebar() fails Jiqian Chen
2025-08-05 8:48 ` Jan Beulich
2025-08-06 3:39 ` Chen, Jiqian
2025-08-06 6:53 ` Jan Beulich
2025-08-05 3:49 ` [PATCH v10 3/4] vpci/msi: Free MSI resources when init_msi() fails Jiqian Chen
2025-08-05 3:49 ` [PATCH v10 4/4] vpci/msix: Free MSIX resources when init_msix() fails Jiqian Chen
2025-08-05 8:10 ` Jan Beulich
2025-08-05 8:27 ` Chen, Jiqian
2025-08-05 8:40 ` Jan Beulich
2025-08-06 8:07 ` Roger Pau Monné [this message]
2025-08-05 8:43 ` Jan Beulich
2025-08-06 3:35 ` Chen, Jiqian
2025-08-06 6:56 ` Jan Beulich
2025-08-06 8:22 ` Roger Pau Monné
2025-08-06 8:30 ` Jan Beulich
2025-08-06 8:39 ` Roger Pau Monné
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aJMNX2RRum-w0_Mu@macbook.local \
--to=roger.pau@citrix.com \
--cc=Jiqian.Chen@amd.com \
--cc=Ray.Huang@amd.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.