[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/2] libxl: Implement the handler to handle unrecoverable AER errors.
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@xxxxxxxxxx> > > --- > > 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@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |