Received: from eggs.gnu.org ([208.118.235.92]:33044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlLlS-0007Nz-JY for qemu-devel@nongnu.org; Wed, 19 Dec 2012 10:41:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlLlK-0002wR-ON for qemu-devel@nongnu.org; Wed, 19 Dec 2012 10:40:58 -0500 Received: from indium.canonical.com ([91.189.90.7]:41971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlLlK-0002wB-8K for qemu-devel@nongnu.org; Wed, 19 Dec 2012 10:40:50 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TlLlJ-0003JS-Cg for ; Wed, 19 Dec 2012 15:40:49 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 46E2D2E807E for ; Wed, 19 Dec 2012 15:40:49 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 19 Dec 2012 15:31:59 -0000 From: Alex Williamson Sender: bounces@canonical.com References: <20121218171248.25658.59752.malonedeb@gac.canonical.com> Message-Id: <20121219153159.23216.7465.malone@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1091766] Re: Physical host crash with Mellanox IB PCI passthrough Reply-To: Bug 1091766 <1091766@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org VFIO is doing what I expect, growing the enabled vectors as each is unmasked. It starts from 1 and has to disable and re-enable each time it grows, so we have: | vfio-pci 0000:20:00.0: irq 150 for MSI/MSI-X 1 | vfio-pci 0000:20:00.0: irq 150 for MSI/MSI-X | vfio-pci 0000:20:00.0: irq 151 for MSI/MSI-X 1 -> 2 | vfio-pci 0000:20:00.0: irq 150 for MSI/MSI-X | vfio-pci 0000:20:00.0: irq 151 for MSI/MSI-X | vfio-pci 0000:20:00.0: irq 152 for MSI/MSI-X 2 -> 3 | vfio-pci 0000:20:00.0: irq 150 for MSI/MSI-X | vfio-pci 0000:20:00.0: irq 151 for MSI/MSI-X | vfio-pci 0000:20:00.0: irq 152 for MSI/MSI-X | vfio-pci 0000:20:00.0: irq 153 for MSI/MSI-X 3 -> 4 So you likely see through lspci that both the guest and host have 4 vectors enabled. On legacy assignment we have: | pci-stub 0000:20:00.0: irq 134 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 135 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 136 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 137 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 138 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 139 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 140 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 141 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 142 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 143 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 144 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 145 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 146 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 147 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 148 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 149 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 150 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 151 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 152 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 153 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 154 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 155 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 156 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 157 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 158 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 159 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 160 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 161 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 162 for MSI/MSI-X | pci-stub 0000:20:00.0: irq 163 for MSI/MSI-X So you have 30 vectors enabled in the host! wow. Does lspci in host and guest confirm this? (ie. 30 vectors on the host and likely 4 vectors on the guest) If so, I'll need to look to see if we can apply something more similar to the vfio solution to legacy assignment, otherwise we're wasting a lot of vectors in the host. Did qemu-kvm-1.0 consume this many vectors? Thanks. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1091766 Title: Physical host crash with Mellanox IB PCI passthrough Status in QEMU: New Bug description: (from http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/100736) We have been using PCI passthrough with the Mellanox IB interface (MT27500 Family [ConnectX-3]) on Debian 6.0.6, kernel 3.2.23 and qemu-kvm-1.0 (both from backports). It worked fine until latest update in backports to qemu-kvm-1.1.2. With newer qemu-kvm versions IB device probe in guest fails leaving firmware to kill whole physical ma= chine. I have then compiled qemu-kvm from source, 1.0.1 was OK, 1.1.2 fails and even 1.2.0 fails as well. Our setup is based on IBM System X iDataPlex dx360 M4 Server. Note: Now I have also tested latest qemu-1.3.0 with linux 3.7.1 and new VFIO mechanism and behaves the same way. On guest the mlx4_core fails to probe device: | mlx4_core 0000:00:08.0: irq 74 for MSI/MSI-X | mlx4_core 0000:00:08.0: irq 75 for MSI/MSI-X | mlx4_core 0000:00:08.0: irq 76 for MSI/MSI-X | mlx4_core 0000:00:08.0: irq 77 for MSI/MSI-X | mlx4_core 0000:00:08.0: NOP command failed to generate MSI-X interrupt = IRQ 51). | mlx4_core 0000:00:08.0: Trying again without MSI-X. | mlx4_core 0000:00:08.0: NOP command failed to generate interrupt (IRQ 5= 1), aborting. | mlx4_core 0000:00:08.0: BIOS or ACPI interrupt routing problem? | mlx4_core 0000:00:08.0: PCI INT A disabled | mlx4_core: probe of 0000:00:08.0 failed with error -16 Which immediately results in reset of the whole physical machine: | Uhhuh. NMI received for unknown reason 3d on CPU 0. | Do you have a strange power saving mode enabled? | Dazed and confused, but trying to continue Followed by events in hardware management module: | A software NMI has occurred on system "SN# xxxxxxx" | Fault in slot "All PCI Err" on system "SN# xxxxxxx" | Fault in slot "PCI 1" on system "SN# xxxxxxx" | A Uncorrectable Bus Error has occurred on system "SN# xxxxxxx" | "Host Power" has been Power Cycled | System "SN# xxxxxxx" has recovered from an NMI Kernel logs for both host/guest machines and different qemu-kvm versions are attached. PCI passthrough for e.g. Intel e1000 works fine with all tested qemu-kvm versions. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1091766/+subscriptions