Those patches are based on the series of patches supporting EEH for VF,
which is pending for merging: https://patchwork.ozlabs.org/patch/581315/
This series of patches fixes couple of issue that resides in previous
patchset:
* The error handlers provided by vfio-pci driver shouldn't be called.
Otherwise, the guest is simply killed.
* When we have partially hoplug in error recovery, we shouldn't remove
those passed-through devices. Otherwise, the guest will be brought
to undefined situation.
* When we have errors detected on PF PE, hold VF PE that has been passed
through to guest until the recovery on PF PE is done
Gavin Shan (3):
powerpc/eeh: Don't propagate error to guest
powerpc/eeh: Don't remove passed VFs
powerpc/eeh: Synchronize recovery in host/guest
arch/powerpc/kernel/eeh.c | 11 +++++++++++
arch/powerpc/kernel/eeh_driver.c | 13 ++++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
--
2.1.0
When we have partial hotplug as part of the error recovery on PF,
the VFs that are bound with vfio-pci driver will experience hotplug.
That's not allowed.
This checks if the VF PE is passed or not. If it does, we leave
the VF without removing it.
Signed-off-by: Gavin Shan <redacted>
---
arch/powerpc/kernel/eeh_driver.c | 3 +++
1 file changed, 3 insertions(+)
When EEH error happened to the parent PE of those PEs that have
been passed through to guest, the error is propagated to guest
domain and the VFIO driver's error handlers are called. It's not
correct as the error in the host domain shouldn't be propagated
to guests and affect them.
This adds one more limitation when calling EEH error handlers.
If the PE has been passed through to guest, the error handlers
won't be called.
Signed-off-by: Gavin Shan <redacted>
---
arch/powerpc/kernel/eeh_driver.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
When passing through SRIOV VFs to guest, we possibly encounter EEH
error on PF. In this case, the VF PEs are put into frozen state.
The error could be reported to guest before it's captured by the
host. That means the guest could attempt to recover errors on VFs
before host gets chance to recover errors on PFs. The VFs won't be
recovered successfully.
This enforces the recovery order for above case: the recovery on
child PE in guest is hold until the recovery on parent PE in host
is completed.
Signed-off-by: Gavin Shan <redacted>
---
arch/powerpc/kernel/eeh.c | 11 +++++++++++
1 file changed, 11 insertions(+)
From: Russell Currey <hidden> Date: 2016-03-02 01:03:27
On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote:
quoted hunk
When passing through SRIOV VFs to guest, we possibly encounter EEH
error on PF. In this case, the VF PEs are put into frozen state.
The error could be reported to guest before it's captured by the
host. That means the guest could attempt to recover errors on VFs
before host gets chance to recover errors on PFs. The VFs won't be
recovered successfully.
This enforces the recovery order for above case: the recovery on
child PE in guest is hold until the recovery on parent PE in host
is completed.
Signed-off-by: Gavin Shan <redacted>
---
arch/powerpc/kernel/eeh.c | 11 +++++++++++
1 file changed, 11 insertions(+)
@@ -1541,6 +1541,17 @@ int eeh_pe_get_state(struct eeh_pe *pe)
if (!eeh_ops || !eeh_ops->get_state)
return -ENOENT;
+ /*
+ * If the parent PE, which is owned by host kernel, is
experiencing
+ * error recovery. We should return temporarily unavailable PE
state
+ * so that the recovery on guest side is suspended until the
error
+ * recovery is completed on host side.
+ */
Hi Gavin,
I think this could be worded a little better. For example:
/*
* If the parent PE is owned by the host kernel and is undergoing
* error recovery, we should return the PE state as temporarily
* unavailable so that the error recovery on the guest is suspended
* until the recovery completes on the host.
*/
From: Russell Currey <hidden> Date: 2016-03-02 01:04:47
On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote:
Those patches are based on the series of patches supporting EEH for VF,
which is pending for merging: https://patchwork.ozlabs.org/patch/581315/
This series of patches fixes couple of issue that resides in previous
patchset:
* The error handlers provided by vfio-pci driver shouldn't be called.
Otherwise, the guest is simply killed.
* When we have partially hoplug in error recovery, we shouldn't remove
those passed-through devices. Otherwise, the guest will be brought
to undefined situation.
* When we have errors detected on PF PE, hold VF PE that has been
passed
through to guest until the recovery on PF PE is done
Gavin Shan (3):
powerpc/eeh: Don't propagate error to guest
powerpc/eeh: Don't remove passed VFs
powerpc/eeh: Synchronize recovery in host/guest
arch/powerpc/kernel/eeh.c | 11 +++++++++++
arch/powerpc/kernel/eeh_driver.c | 13 ++++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
For the whole series (incorporating my comments on patch 3):
Reviewed-by: Russell Currey <redacted>
On Wed, Mar 02, 2016 at 12:03:20PM +1100, Russell Currey wrote:
On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote:
quoted
When passing through SRIOV VFs to guest, we possibly encounter EEH
error on PF. In this case, the VF PEs are put into frozen state.
The error could be reported to guest before it's captured by the
host. That means the guest could attempt to recover errors on VFs
before host gets chance to recover errors on PFs. The VFs won't be
recovered successfully.
This enforces the recovery order for above case: the recovery on
child PE in guest is hold until the recovery on parent PE in host
is completed.
Signed-off-by: Gavin Shan <redacted>
---
arch/powerpc/kernel/eeh.c | 11 +++++++++++
1 file changed, 11 insertions(+)
@@ -1541,6 +1541,17 @@ int eeh_pe_get_state(struct eeh_pe *pe)
if (!eeh_ops || !eeh_ops->get_state)
return -ENOENT;
+ /*
+ * If the parent PE, which is owned by host kernel, is
experiencing
+ * error recovery. We should return temporarily unavailable PE
state
+ * so that the recovery on guest side is suspended until the
error
+ * recovery is completed on host side.
+ */
Hi Gavin,
I think this could be worded a little better. For example:
/*
* If the parent PE is owned by the host kernel and is undergoing
* error recovery, we should return the PE state as temporarily
* unavailable so that the error recovery on the guest is suspended
* until the recovery completes on the host.
*/
Yes, it will be integrated to v2. Thanks for review.