[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170119122604.2ee85ebc@t450s.home>
Date: Thu, 19 Jan 2017 12:26:04 -0700
From: Alex Williamson <alex.williamson@...hat.com>
To: Cao jin <caoj.fnst@...fujitsu.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
<linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>,
<qemu-devel@...gnu.org>, <izumi.taku@...fujitsu.com>
Subject: Re: [PATCH v2] vfio/pci: Support error recovery
On Thu, 19 Jan 2017 11:04:37 +0800
Cao jin <caoj.fnst@...fujitsu.com> wrote:
> On 01/19/2017 05:32 AM, Alex Williamson wrote:
> > On Tue, 10 Jan 2017 17:11:01 +0200
> > "Michael S. Tsirkin" <mst@...hat.com> wrote:
> >
> >> On Tue, Jan 10, 2017 at 07:46:17PM +0800, Cao jin wrote:
> >>>
> >>>
> >>> On 01/10/2017 07:04 AM, Michael S. Tsirkin wrote:
> >>>> On Sat, Dec 31, 2016 at 05:15:36PM +0800, Cao jin wrote:
> >>>>> Support serious device error recovery
> >>>>
> >>>> serious?
> >>>>
> >>>
> >>> Sorry for my poor vocabulary if it confuses people. I wanted to express
> >>> the meaning that: vfio-pci actually cannot do a real recovery for device
> >>> even if it provides the callbacks, it relies on the user to do a
> >>> effective(or word "serious"?) recovery.
> >>>
> >>> Welcome the amendment on the commit log.
> >>
> >> It's up to Alex, maybe he's able to figure it all out from
> >> code, but the rest of us could benefit from a description
> >> of what the patch does from userspace point of view.
> >>
> >> Also, is it a pre-requisite of the userspace patches you posted?
> >
> > This is the same blocking user accesses while the device is in recovery
> > that you thought was ineffective/wrong before. Why do we still need it
> > if QEMU isn't trying to handle fatal errors? If the kernel is doing a
> > reset shouldn't the user consider the device dead? A commit log
> > explaining this is absolutely necessary. Thanks,
> >
> > Alex
> >
>
> Yes, it is the same blocking user access as before, and I did said it is
> not effective as we expected, and I drew the figure to illustrate my
> analysis. I think the blocking is right, maybe just not enough to work
> fine, because it is possible that vfio's blocking is over, while
> hardware reset is not done, results in inaccessible device.
>
> Leave the blocking here is no harm for now, and could be useful in
> future(when we handle fatal error).
If you want this in the kernel, you're going to need to invest the
effort to make it work. I'm not going to put in code that is
ineffective at what it intends to do.
> We don't forward fatal error events to guest, why would guest kernel do
> a reset? Or do you mean some device driver would do hardware reset on
> non-fatal error?
The question is if we're only trying to recover from non-fatal events,
what is the scenario where the user is attempting to access the device
while it's in reset? Do we need to consider the existing notifier to
be a fatal event where access to the device should stop immediately and
add a new notifier for non-fatal events where it's safe for the user to
access the device? Trying to use the eventfd to push status through a
single notifier seems flawed. Thanks,
Alex
Powered by blists - more mailing lists