[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 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.

> +
> +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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.