Author: mav
Date: Mon Jun 15 13:47:49 2009
New Revision: 194237
URL: http://svn.freebsd.org/changeset/base/194237

Log:
  Forbid multi-vector MSI interrupt vectors migration to another CPU once
  allocated. MSI have strict vectors allocation requirements, which are not
  satisfied now during reallocation. This is not the best possible solution,
  but better then just broken, as it was.
  
  No objections: current@, arch@, jhb@

Modified:
  head/sys/amd64/amd64/msi.c
  head/sys/i386/i386/msi.c

Modified: head/sys/amd64/amd64/msi.c
==============================================================================
--- head/sys/amd64/amd64/msi.c  Mon Jun 15 13:17:05 2009        (r194236)
+++ head/sys/amd64/amd64/msi.c  Mon Jun 15 13:47:49 2009        (r194237)
@@ -210,6 +210,8 @@ msi_assign_cpu(struct intsrc *isrc, u_in
        old_id = msi->msi_cpu;
        if (old_vector && old_id == apic_id)
                return;
+       if (old_vector && !msi->msi_msix && msi->msi_first->msi_count > 1)
+               return;
        /* Allocate IDT vector on this cpu. */
        vector = apic_alloc_vector(apic_id, msi->msi_irq);
        if (vector == 0)

Modified: head/sys/i386/i386/msi.c
==============================================================================
--- head/sys/i386/i386/msi.c    Mon Jun 15 13:17:05 2009        (r194236)
+++ head/sys/i386/i386/msi.c    Mon Jun 15 13:47:49 2009        (r194237)
@@ -210,6 +210,8 @@ msi_assign_cpu(struct intsrc *isrc, u_in
        old_id = msi->msi_cpu;
        if (old_vector && old_id == apic_id)
                return;
+       if (old_vector && !msi->msi_msix && msi->msi_first->msi_count > 1)
+               return;
        /* Allocate IDT vector on this cpu. */
        vector = apic_alloc_vector(apic_id, msi->msi_irq);
        if (vector == 0)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to