All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: libxl__device_pci_reset() questions
Date: Fri, 27 Feb 2015 17:11:23 -0500	[thread overview]
Message-ID: <20150227221122.GA11754@l.oracle.com> (raw)
In-Reply-To: <54EF3BA202000078000641C7@mail.emea.novell.com>

On Thu, Feb 26, 2015 at 02:28:34PM +0000, Jan Beulich wrote:
> >>> On 19.02.15 at 15:30, <ian.campbell@citrix.com> wrote:
> > On Thu, 2015-02-19 at 13:59 +0000, Jan Beulich wrote:
> >> All,
> >> 
> >> in the context of someone seeing "The kernel doesn't support reset
> >> from sysfs for PCI device", is my understanding correct that the lack
> >> of error checking in any caller (perhaps intentional) means that any
> >> of the errors logged from this function are really just warnings, i.e.
> >> don't prevent the assignment from taking place?
> > 
> > It was a long while ago, but I believe that was the intention, yes.
> > 
> >> Furthermore I'm puzzled by the function first thing trying to access
> >> a "do_flr" file supposedly made available by the pciback driver, yet
> >> I can't see either the upstream or the old 2.6.18 driver surfacing
> >> such a file. What am I missing here?
> > 
> > I'm not sure, on the basis of
> > http://lists.xen.org/archives/html/xen-devel/2014-06/msg03105.html and 
> > http://lists.xen.org/archives/html/xen-devel/2014-07/msg01108.html I've
> > added Konrad to the CC.
> 
> Konrad?

I talked with David about this and his point was that:
 1). If the device advertises it can 'reset' it be better be able to do it.

 2). However there are some that lie. If they exist we should have an quirk for them
     in the PCI layer so that we don't think we have this feature available.

 3). In the case where the PCI device has none of the mechanism to do the reset
     we should provide on via xen-pciback.

The 3) David had a patch which is in XenServer which does the work - it first
figures out whether the PCI device reports as being able to do the reset. If it
is not, then we install our own 'reset' SysFS which will do the bus reset.

However looking at how VFIO and QEMU does it - there is also an check on 
the user-space part - where it decideds in some cases to ignore the 'reset'
from SysFS and do its bus-reset via the VFIO ioctl. I hadn't yet digged
completlely in the code to understand what the logic states it has to
use the VFIO ioctl bus reset instead of the PCI reset mechanism.

> 
> Thanks, Jan
> 

  reply	other threads:[~2015-02-27 22:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 13:59 libxl__device_pci_reset() questions Jan Beulich
2015-02-19 14:30 ` Ian Campbell
2015-02-19 15:09   ` Sander Eikelenboom
2015-02-19 15:26     ` Ian Campbell
2015-02-26 14:28   ` Jan Beulich
2015-02-27 22:11     ` Konrad Rzeszutek Wilk [this message]
2015-02-19 15:30 ` David Vrabel

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=20150227221122.GA11754@l.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.