From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA1E0C10F0E for ; Tue, 9 Apr 2019 14:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 838132084F for ; Tue, 9 Apr 2019 14:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbfDIOnj convert rfc822-to-8bit (ORCPT ); Tue, 9 Apr 2019 10:43:39 -0400 Received: from mail.wl.linuxfoundation.org ([198.145.29.98]:53910 "EHLO mail.wl.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726701AbfDIOnF (ORCPT ); Tue, 9 Apr 2019 10:43:05 -0400 Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C3E1289C9 for ; Tue, 9 Apr 2019 14:43:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86EA32894C; Tue, 9 Apr 2019 14:43:03 +0000 (UTC) From: bugzilla-daemon@bugzilla.kernel.org To: kvm@vger.kernel.org Subject: [Bug 202055] Failed to PCI passthrough SSD with SMI SM2262 controller. Date: Tue, 09 Apr 2019 14:43:02 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: AssignedTo virtualization_kvm@kernel-bugs.osdl.org X-Bugzilla-Product: Virtualization X-Bugzilla-Component: kvm X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tomm@lime-technology.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: virtualization_kvm@kernel-bugs.osdl.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org https://bugzilla.kernel.org/show_bug.cgi?id=202055 --- Comment #43 from LimeTech (tomm@lime-technology.com) --- (In reply to Alex Williamson from comment #42) > It seems there's a partial workaround available since QEMU v2.12 hiding > under our noses. That version adds support for relocating the MSI-X vector > table on vfio-pci devices, which recreates the MSI-X MMIO space elsewhere on > the device. A side-effect of this is that the vector table and PBA are > properly sized so as not to collide. The size of the tables remains wrong, > but this only becomes a problem if the nvme code attempts to allocate >16 > vectors, which requires >15 vCPU (or host CPUs if the device is returned to > host drivers after being assigned)(nvme appears to allocate 1 admin queue, > plus a queue per CPU, each making use of an IRQ vector). The QEMU vfio-pci > device option is x-msix-relocation= which allows specifying the bar to use > for the MSI-X tables, ex. bar0...bar5. Since this device uses a 64bit bar0, > we can either extend that BAR or choose another, excluding bar1, which is > consumed by the upper half of bar0. For instance, I tested with: > > > ... > > >
> > >
function='0x0'/> > > ... > > > > > > > (NB: "ua-" is a required prefix when specifying an alias) > > A new virtual BAR appears in the guest hosting the MSI-X table and QEMU > starts normally so long as the guest doesn't exceed 15 vCPUs. > > The vCPU/pCPU count limitations are obviously not ideal, but hopefully this > provides some degree of workaround for typical configurations. Hi Alex, are you saying the above coding in the VM xml is all that is necessary (with noted vCPU/pCPU count limitations) to successfully pass-through sm2262-based controllers, without above kernel patch? Or is a kernel patch also necessary (if so, which one)? thx, -tom -- You are receiving this mail because: You are watching the assignee of the bug.