From: Chris Wright <chrisw@sous-sol.org>
To: Greg KH <greg@kroah.com>
Cc: Chris Wright <chrisw@sous-sol.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matthew Wilcox <matthew@wil.cx>,
Linus Torvalds <torvalds@linux-foundation.org>,
Yu Zhao <yu.zhao@intel.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
stable@kernel.org
Subject: Re: [PATCH] SR-IOV: correct broken resource alignment calculations
Date: Fri, 28 Aug 2009 12:58:23 -0700 [thread overview]
Message-ID: <20090828195823.GJ10360@sequoia.sous-sol.org> (raw)
In-Reply-To: <20090828194338.GB16479@kroah.com>
* Greg KH (greg@kroah.com) wrote:
> On Fri, Aug 28, 2009 at 12:17:14PM -0700, Chris Wright wrote:
> > An SR-IOV capable device includes an SR-IOV PCIe capability which
> > describes the Virtual Function (VF) BAR requirements. A typical SR-IOV
> > device can support multiple VFs whose BARs must be in a contiguous region,
> > effectively an array of VF BARs. The BAR reports the size requirement
> > for a single VF. We calculate the full range needed by simply multiplying
> > the VF BAR size with the number of possible VFs and create a resource
> > spanning the full range.
> >
> > This all seems sane enough except it artificially inflates the alignment
> > requirement for the VF BAR. The VF BAR need only be aligned to the size
> > of a single BAR not the contiguous range of VF BARs. This can cause us
> > to fail to allocate resources for the BAR despite the fact that we
> > actually have enough space.
> >
> > This patch adds a support for a new resource alignment type,
> > IORESOURCE_VSIZEALIGN, and allows struct resource to keep track of the
> > size requirements of a VF BAR which are smaller than the full resource
> > size. This could also be done all within the PCI layer w/out bloating
> > struct resource or using the last available bit for alignment types.
> >
> > Comments?
> >
> > Signed-off-by: Chris Wright <chrisw@sous-sol.org>
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
> > Cc: Linus Torvalds <torvalds@linux-foundation.org>
> > Cc: Matthew Wilcox <matthew@wil.cx>
> > Cc: Yu Zhao <yu.zhao@intel.com>
> > Cc: stable@kernel.org
>
> This is a new feature, which seems to be odd to have it sent to stable
> :)
Yeah, it's broken now (and shipped in 2.6.30).
> Does this fix reported problems in the "wild"?
Depending on card firwmware, yeah, I've hit this problem.
thanks,
-chris
next prev parent reply other threads:[~2009-08-28 20:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 19:17 Chris Wright
2009-08-28 19:43 ` Greg KH
2009-08-28 19:58 ` Chris Wright [this message]
2009-08-28 19:48 ` Matthew Wilcox
2009-08-28 19:59 ` Chris Wright
2009-08-28 20:00 ` [PATCH v2] " Chris Wright
2009-08-30 15:39 ` Jesse Barnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090828195823.GJ10360@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=greg@kroah.com \
--cc=ink@jurassic.park.msu.ru \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=yu.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®