From owner-svn-src-all@FreeBSD.ORG Mon Jun 15 13:47:49 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFF92106566C; Mon, 15 Jun 2009 13:47:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE9998FC0C; Mon, 15 Jun 2009 13:47:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FDlndC091346; Mon, 15 Jun 2009 13:47:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FDlnYO091344; Mon, 15 Jun 2009 13:47:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200906151347.n5FDlnYO091344@svn.freebsd.org> From: Alexander Motin Date: Mon, 15 Jun 2009 13:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194237 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 13:47:50 -0000 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)