From patchwork Fri Nov 9 16:56:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 1721321 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2AA313FCF7 for ; Fri, 9 Nov 2012 16:57:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754622Ab2KIQ47 (ORCPT ); Fri, 9 Nov 2012 11:56:59 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:39799 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754483Ab2KIQ46 (ORCPT ); Fri, 9 Nov 2012 11:56:58 -0500 Received: by mail-bk0-f46.google.com with SMTP id jk13so1741830bkc.19 for ; Fri, 09 Nov 2012 08:56:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=7pXYab0VLiIvnDyt4QFMY6mGocF/Qx27jvYhB2vutl8=; b=IVwK84GgzYX++GgwdEA8UATGiYJDLdz22SX+TcXkoKuAVrs0yvJji9MSXdKi7q/n+d jReyG5WNfLnABE3Ka0wCMRj4JvnR1fHyjam5JWPlJ3hXSfdP/fQsavNVsw9DvbmPfReD bff39p5WEqCJJj4y3uq6LTqWGTozpWQTAvXEtct9s5fFDFgWiqFPQGQrwBfL8EY53qMX GuYP8a9K01lkEHSIr8bXjnL2/UVd1Xl9NA1SgSbj0g2xAZIGq46ZG+47yGp+NyGM78mb 7cPmA1JoFQ60mEav5UTOiIrDKz4peG850Q88mUSpGfSqcfVIWATARhQTHxzy7s/+zg5E odzQ== MIME-Version: 1.0 Received: by 10.204.131.87 with SMTP id w23mr3847780bks.73.1352480216337; Fri, 09 Nov 2012 08:56:56 -0800 (PST) Received: by 10.205.83.205 with HTTP; Fri, 9 Nov 2012 08:56:56 -0800 (PST) In-Reply-To: References: <201211081915083774239@gmail.com> <509B962C.6070002@gmail.com> Date: Fri, 9 Nov 2012 08:56:56 -0800 X-Google-Sender-Auth: E3mXlR-lUp2bGymSDHRP8r6BHkE Message-ID: Subject: Re: SR-IOV problem with Intel 82599EB (not enough MMIO resources for SR-IOV) From: Yinghai Lu To: Bjorn Helgaas Cc: Jason Gao , "Rose, Gregory V" , "Kirsher, Jeffrey T" , linux-kernel , netdev , kvm , "e1000-devel@lists.sourceforge.net" , linux-pci@vger.kernel.org Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, Nov 9, 2012 at 7:26 AM, Bjorn Helgaas wrote: > [+ linux-pci, Yinghai] > > On Thu, Nov 8, 2012 at 8:59 PM, Jason Gao wrote: >>> The BIOS in your machine doesn't support SR-IOV. You'll need to ask the manufacturer for a BIOS upgrade, if in fact one is available. Sometimes they're not. >> >> very thanks Greg,my server Dell R710 with latest BIOS version and >> option for SR-IOV(SR-IOV Global Enable->Enabled) opened,I'm confused >> that Does R710 provide full support for SR-IOV, kernel or ixgbe >> driver's bug? but I'm not sure where the problem lies,anyone has any >> experience about this? . > > Linux normally uses the resource assignments done by the BIOS, but it > is possible for the kernel to reassign those. We don't have good > automatic support for that yet, but on a recent upstream kernel, you > can try "pci=realloc". I doubt this option is in CentOS 6.3, though. > > If an upstream kernel with "pci=realloc" still doesn't work, please > post the entire dmesg log. Even better, upstream kernel will enable realloc automatically if it finds some SRIOV BAR is not assigned. related logic is in pci_realloc_detect(). BTW, we may need another patch about realloc. http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=patch;h=afb9975bddd92b17c2f9859676ce521e2e014997 From afb9975bddd92b17c2f9859676ce521e2e014997 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Wed, 3 Oct 2012 19:15:57 -0700 Subject: [PATCH] PCI: Add root bus children dev's res to fail list We can stop trying according to try number now and do not need to use root_bus checking as stop sign anymore. In extreme case we could need to reallocate resource for device just under root bus. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) * be enabled later, don't add it to the list diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 1e808ca..9e625d84 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -283,7 +283,7 @@ static void assign_requested_resources_sorted(struct list_head *head, idx = res - &dev_res->dev->resource[0]; if (resource_size(res) && pci_assign_resource(dev_res->dev, idx)) { - if (fail_head && !pci_is_root_bus(dev_res->dev->bus)) { + if (fail_head) { /* * if the failed res is for ROM BAR, and it will