[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.4] x86/MSI: fix MSI-X case of freeing IRQ
commit 4e08d1280f026e48bdf38e95a7c2a175b8256369 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Oct 17 15:54:31 2014 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Oct 17 15:54:31 2014 +0200 x86/MSI: fix MSI-X case of freeing IRQ Commit d1b6d0a024 ("x86: enable multi-vector MSI") went a little too far with moving things around in msi_free_irqs() in order to streamline the code: We shouldn't drop the MSI-X control page reference before calling destroy_irq(), as the latter will call us back via desc->handler->shutdown() (effectively invoking to msi_set_mask_bit()). Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> master commit: 44d20c69516f8d5e71fc14bf216e230a9910d729 master date: 2014-10-06 11:11:28 +0200 --- xen/arch/x86/msi.c | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 61d6dd0..99312d9 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -496,15 +496,8 @@ int __setup_msi_irq(struct irq_desc *desc, struct msi_desc *msidesc, int msi_free_irq(struct msi_desc *entry) { - unsigned int nr = entry->msi.nvec; - - if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX ) - { - unsigned long start; - start = (unsigned long)entry->mask_base & ~(PAGE_SIZE - 1); - msix_put_fixmap(entry->dev->msix, virt_to_fix(start)); - nr = 1; - } + unsigned int nr = entry->msi_attrib.type != PCI_CAP_ID_MSIX + ? entry->msi.nvec : 1; while ( nr-- ) { @@ -515,6 +508,10 @@ int msi_free_irq(struct msi_desc *entry) iommu_update_ire_from_msi(entry + nr, NULL); } + if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX ) + msix_put_fixmap(entry->dev->msix, + virt_to_fix((unsigned long)entry->mask_base)); + list_del(&entry->list); xfree(entry); return 0; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.4 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |