From: Venu Busireddy <venu.busireddy@oracle.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Jan Beulich <jbeulich@suse.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH v2 1/2] libxl: Implement the handler to handle unrecoverable AER errors.
Date: Fri, 28 Jul 2017 10:15:40 -0700 [thread overview]
Message-ID: <20170728171540.GA11195@fett.us.oracle.com> (raw)
In-Reply-To: <20170728155813.hebqxpjslxuf7bue@citrix.com>
On 2017-07-28 16:58:13 +0100, Wei Liu wrote:
> On Wed, Jul 26, 2017 at 07:16:38PM -0500, Venu Busireddy wrote:
> > Implement the callback function to handle unrecoverable AER errors, and
> > also the public APIs that can be used to register/unregister the handler.
> > When an AER error occurs, the handler will forcibly remove the erring
> > PCIe device from the guest.
> >
> > Signed-off-by: Venu Busireddy <venu.busireddy@oracle.com>
> > ---
> > tools/libxl/libxl_event.h | 2 ++
> > tools/libxl/libxl_pci.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 87 insertions(+)
> >
>
> Please also add a LIBXL_HAVE macro to libxl.h. There are plenty of
> examples there.
I assume you meant, for example, something like:
/* LIBXL_HAVE_UNREG_AER_EVENTS_HANDLER
*
* If it is defined, libxl has a library function called
* libxl_unreg_aer_events_handler.
*/
#define LIBXL_HAVE_UNREG_AER_EVENTS_HANDLER 1
If so, I will add them in the next revision.
> > +
> > +int libxl_reg_aer_events_handler(libxl_ctx *ctx, uint32_t domid)
> > +{
> > + int rc = 0;
> > + char *be_path;
> > + GC_INIT(ctx);
> > +
> > + aer_watch.domid = domid;
> > + be_path = GCSPRINTF("/local/domain/0/backend/pci/%u/0/aerFailedSBDF", domid);
>
> I think the best thing to do is you get the domid using
> libxl__get_domid. Try not to hard-code 0.
>
> Same for your callback function. And there are quite a few 0's that I'm
> not sure what they stand for.
All those 0's are saying dom0's domid. Isn't dom0's domid always 0?
If that is not the case, I can use libxl__get_domid(). Please let me
know.
Venu
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-07-28 17:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 0:16 [PATCH v2 0/2] Containing AER unrecoverable errors Venu Busireddy
2017-07-27 0:16 ` [PATCH v2 1/2] libxl: Implement the handler to handle unrecoverable AER errors Venu Busireddy
2017-07-28 15:58 ` Wei Liu
2017-07-28 17:15 ` Venu Busireddy [this message]
2017-07-31 14:37 ` Wei Liu
2017-07-28 16:39 ` Ian Jackson
2017-07-28 23:56 ` Venu Busireddy
2017-07-31 15:03 ` Wei Liu
2017-07-27 0:16 ` [PATCH v2 2/2] xl: Register the AER event handler to handle " Venu Busireddy
2017-07-28 15:58 ` Wei Liu
2017-07-28 16:06 ` Venu Busireddy
2017-07-28 16:14 ` Wei Liu
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=20170728171540.GA11195@fett.us.oracle.com \
--to=venu.busireddy@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.