Re: [PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-23 Thread Jan Beulich
On 23.07.2025 09:54, Chen, Jiqian wrote: > On 2025/7/22 00:21, Roger Pau Monné wrote: >> On Fri, Jul 04, 2025 at 03:08:02PM +0800, Jiqian Chen wrote: >>> When init_msi() fails, current logic return fail and free MSI-related >>> resources in vpci_deassign_device(). But the previous new changes will

Re: [PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-23 Thread Chen, Jiqian
On 2025/7/22 00:21, Roger Pau Monné wrote: > On Fri, Jul 04, 2025 at 03:08:02PM +0800, Jiqian Chen wrote: >> When init_msi() fails, current logic return fail and free MSI-related >> resources in vpci_deassign_device(). But the previous new changes will >> hide MSI capability and return success, it

Re: [PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 04, 2025 at 03:08:02PM +0800, Jiqian Chen wrote: > When init_msi() fails, current logic return fail and free MSI-related > resources in vpci_deassign_device(). But the previous new changes will > hide MSI capability and return success, it can't reach > vpci_deassign_device() to remove r

Re: [PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-08 Thread Jan Beulich
On 09.07.2025 08:10, Chen, Jiqian wrote: > On 2025/7/8 23:13, Jan Beulich wrote: >> On 04.07.2025 09:08, Jiqian Chen wrote: >>> @@ -193,6 +234,42 @@ static void cf_check mask_write( >>> msi->mask = val; >>> } >>> >>> +static int cf_check cleanup_msi(const struct pci_dev *pdev) >>> +{ >>> +

Re: [PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-08 Thread Chen, Jiqian
On 2025/7/8 23:13, Jan Beulich wrote: > On 04.07.2025 09:08, Jiqian Chen wrote: >> --- >> v6->v7 changes: >> * Change the pointer parameter of cleanup_msi() to be const. >> * When vpci_remove_registers() in cleanup_msi() fails, not to return >> directly, instead try to free msi and re-add ctrl ha

Re: [PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-08 Thread Jan Beulich
On 04.07.2025 09:08, Jiqian Chen wrote: > --- > v6->v7 changes: > * Change the pointer parameter of cleanup_msi() to be const. > * When vpci_remove_registers() in cleanup_msi() fails, not to return > directly, instead try to free msi and re-add ctrl handler. > * Pass pdev->vpci into vpci_add_regi

[PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-04 Thread Jiqian Chen
When init_msi() fails, current logic return fail and free MSI-related resources in vpci_deassign_device(). But the previous new changes will hide MSI capability and return success, it can't reach vpci_deassign_device() to remove resources if hiding success, so those resources must be removed in cle