From: Russell Currey <ruscur@russell.cc>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/3] powerpc/eeh: Synchronize recovery in host/guest
Date: Wed, 02 Mar 2016 12:03:20 +1100 [thread overview]
Message-ID: <1456880600.4528.3.camel@russell.cc> (raw)
In-Reply-To: <1456445092-18337-4-git-send-email-gwshan@linux.vnet.ibm.com>
On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote:
> 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 <gwshan@linux.vnet.ibm.com>
> ---
> arch/powerpc/kernel/eeh.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
> index fd9c782..42bd546 100644
> --- a/arch/powerpc/kernel/eeh.c
> +++ b/arch/powerpc/kernel/eeh.c
> @@ -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.
*/
> + if (pe->parent &&
> + !(pe->state & EEH_PE_REMOVED) &&
> + (pe->parent->state & (EEH_PE_ISOLATED | EEH_PE_RECOVERING)))
> + return EEH_PE_STATE_UNAVAIL;
> +
> result = eeh_ops->get_state(pe, NULL);
> rst_active = !!(result & EEH_STATE_RESET_ACTIVE);
> dma_en = !!(result & EEH_STATE_DMA_ENABLED);
next prev parent reply other threads:[~2016-03-02 1:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 0:04 [PATCH 0/3] powerpc/eeh: Enhancement to EEH for VF Gavin Shan
2016-02-26 0:04 ` [PATCH 1/3] powerpc/eeh: Don't propagate error to guest Gavin Shan
2016-02-26 0:04 ` [PATCH 2/3] powerpc/eeh: Don't remove passed VFs Gavin Shan
2016-02-26 0:04 ` [PATCH 3/3] powerpc/eeh: Synchronize recovery in host/guest Gavin Shan
2016-03-02 1:03 ` Russell Currey [this message]
2016-03-02 2:13 ` Gavin Shan
2016-03-02 1:04 ` [PATCH 0/3] powerpc/eeh: Enhancement to EEH for VF Russell Currey
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=1456880600.4528.3.camel@russell.cc \
--to=ruscur@russell.cc \
--cc=gwshan@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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).