From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>,
Alex Williamson <alex.williamson@redhat.com>
Cc: aik@ozlabs.ru, qiudayu@linux.vnet.ibm.com,
linuxppc-dev@lists.ozlabs.org, agraf@suse.de,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device
Date: Fri, 23 May 2014 15:00:55 +1000 [thread overview]
Message-ID: <1400821255.29150.62.camel@pasglop> (raw)
In-Reply-To: <20140523043722.GA11572@shangw>
On Fri, 2014-05-23 at 14:37 +1000, Gavin Shan wrote:
> >There's no notification, the user needs to observe the return value an
> >poll? Should we be enabling an eventfd to notify the user of the state
> >change?
> >
>
> Yes. The user needs to monitor the return value. we should have one notification,
> but it's for later as we discussed :-)
../..
> >How does the guest learn about the error? Does it need to?
>
> When guest detects 0xFF's from reading PCI config space or IO, it's going
> check the device (PE) state. If the device (PE) has been put into frozen
> state, the recovery will be started.
Quick recap for Alex W (we discussed that with Alex G).
While a notification looks like a worthwhile addition in the long run, it
is not sufficient and not used today and I prefer that we keep that as something
to add later for those two main reasons:
- First, the kernel itself isn't always notified. For example, if we implement
on top of an RTAS backend (PR KVM under pHyp) or if we are on top of PowerNV but
the error is a PHB "fence" (the entire PCI Host bridge gets fenced out in hardware
due to an internal error), then we get no notification. Only polling of the
hardware or firmware will tell us. Since we don't want to have a polling timer
in the kernel, that means that the userspace client of VFIO (or alternatively
the KVM guest) is the one that polls.
- Second, this is how our primary user expects it: The primary (and only initial)
user of this will be qemu/KVM for PAPR guests and they don't have a notification
mechanism. Instead they query the EEH state after detecting an all 1's return from
MMIO or config space. This is how PAPR specifies it so we are just implementing the
spec here :-)
Because of these, I think we shouldn't worry too much about notification at
this stage.
Cheers,
Ben.
next prev parent reply other threads:[~2014-05-23 5:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 8:23 [PATCH v6 0/3] EEH Support for VFIO PCI device Gavin Shan
2014-05-22 8:23 ` [PATCH v6 1/3] powerpc/eeh: Flags for passed device and PE Gavin Shan
2014-05-22 8:23 ` [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device Gavin Shan
2014-05-22 9:55 ` Alexander Graf
2014-05-23 0:17 ` Gavin Shan
2014-05-23 0:37 ` Gavin Shan
2014-05-23 3:23 ` Alex Williamson
2014-05-23 6:52 ` Alexander Graf
2014-05-23 11:58 ` Gavin Shan
2014-05-23 12:30 ` Alexander Graf
2014-05-23 14:49 ` Alex Williamson
2014-05-24 1:37 ` Gavin Shan
2014-05-23 12:51 ` Alex Williamson
2014-05-23 13:24 ` Alexander Graf
2014-05-23 3:10 ` Alex Williamson
2014-05-23 4:37 ` Gavin Shan
2014-05-23 5:00 ` Benjamin Herrenschmidt [this message]
2014-05-23 14:36 ` Alex Williamson
2014-05-23 6:55 ` Alexander Graf
2014-05-23 7:37 ` Gavin Shan
2014-05-23 9:58 ` Alexander Graf
2014-05-23 11:55 ` Gavin Shan
2014-05-23 11:58 ` Alexander Graf
2014-05-23 12:43 ` Gavin Shan
2014-05-23 12:49 ` Alexander Graf
2014-05-24 1:46 ` Gavin Shan
2014-05-23 14:29 ` Alex Williamson
2014-05-24 2:06 ` Gavin Shan
2014-05-27 17:39 ` Alex Williamson
2014-05-22 8:23 ` [PATCH v6 3/3] powerpc/eeh: Avoid event on passed PE Gavin Shan
2014-05-22 9:55 ` Alexander Graf
2014-05-23 0:01 ` Gavin Shan
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=1400821255.29150.62.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=gwshan@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=qiudayu@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).