From: Don Dutile <ddutile@redhat.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
Subject: Re: [PATCH] pci: Save and restore VFs as a part of a reset
Date: Wed, 28 May 2014 16:34:04 -0400 [thread overview]
Message-ID: <5386483C.60506@redhat.com> (raw)
In-Reply-To: <CAErSpo4htYwi3jfoxdj=W9VjVdd5gDjYcxg_i52VVz1sYQHL5A@mail.gmail.com>
On 05/28/2014 04:14 PM, Bjorn Helgaas wrote:
> On Wed, May 28, 2014 at 10:39 AM, Alexander Duyck
> <alexander.h.duyck@intel.com> wrote:
>> On 05/27/2014 09:12 PM, Alex Williamson wrote:
>>> On Tue, 2014-05-27 at 19:19 -0600, Bjorn Helgaas wrote:
>
>>>> Maybe resetting the PF should just fail if there's an active VF. If
>>>> you need to reset the PF, you'd have to unbind the VFs first.
>>>
>>> The use case is certainly questionable, personally I'm not going to
>>> expect VFs to continue working after the PF is reset. Driver binding
>>> gets complicated, especially when KVM doesn't actually bind devices to
>>> use them. Hopefully we'll get that out of the tree some day though. I
>>> suppose we could -EBUSY the PF reset as long as VFs are enabled.
>>
>> What I could do is go through and notify the VFs that they are about to
>> get hit by a reset. What they do with that information would be up to them.
>>
>> So if the VFs are loaded on the host I could then at least allow them to
>> recover by saving and restoring the config space within the driver
>> themselves.
>
> I really like the idea of punting by failing the PF reset if there are
> any active VFs. That's a really easy way of making sure we aren't
> going to blow up any guests. What problems would it cause if we went
> this route?
>
I think this is the safest route. PF<->VF interaction isn't architected,
and resetting the PF with active VFs will probably hang a number of SRIOV
implementations, requiring a system-level reset to correct the compounded problem.
>>>> This reminds me about an open problem: VFs can be on "virtual" buses,
>>>> which aren't really connected in the hierarchy, and I don't think we
>>>> have a nice way to iterate over them. So probably pci_get_device() is
>>>> the best we can do now.
>>>
>>> Yeah, those virtual buses don't have a bus->self, we just have to skip
>>> to bus->parent->self. pci_walk_bus() goes in the opposite direction,
>>> but without an actual device hosting the bus, I don't see how it finds
>>> it. Thanks,
>>
>> It seems like we should be able to come up with something like
>> pci_walk_vbus() though or something similar. All we would need to do is
>> search the VFs on the bus of the PF and all child busses to that bus if
>> I am not mistaken.
>
> I don't think that's going to work because the virtual buses don't
> appear as the child bus of anything.
>
+1.
> Bjorn
>
next prev parent reply other threads:[~2014-05-28 20:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 21:25 [PATCH] pci: Save and restore VFs as a part of a reset Alexander Duyck
2014-05-27 22:22 ` Bjorn Helgaas
2014-05-27 23:53 ` Alexander Duyck
2014-05-28 1:19 ` Bjorn Helgaas
2014-05-28 4:12 ` Alex Williamson
2014-05-28 16:39 ` Alexander Duyck
2014-05-28 17:03 ` Alex Williamson
2014-05-28 20:14 ` Bjorn Helgaas
2014-05-28 20:34 ` Don Dutile [this message]
2014-05-28 22:23 ` Alexander Duyck
-- strict thread matches above, loose matches on Subject: below --
2014-04-21 17:38 Alexander Duyck
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=5386483C.60506@redhat.com \
--to=ddutile@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=alexander.h.duyck@intel.com \
--cc=bhelgaas@google.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).