[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 2/2] xl: Register the AER event handler to handle AER errors.
When a guest is created, register the AER event handler to handle the AER errors. 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/xl/xl_vmcontrol.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c index 89c2b25..10a48a9 100644 --- a/tools/xl/xl_vmcontrol.c +++ b/tools/xl/xl_vmcontrol.c @@ -966,6 +966,15 @@ start: LOG("Waiting for domain %s (domid %u) to die [pid %ld]", d_config.c_info.name, domid, (long)getpid()); + ret = libxl_reg_aer_events_handler(ctx, domid); + if (ret) { + /* + * This error may not be severe enough to fail the creation of the VM. + * Log the error, and continue with the creation. + */ + LOG("libxl_reg_aer_events_handler() failed, ret = 0x%08x", ret); + } + ret = libxl_evenable_domain_death(ctx, domid, 0, &deathw); if (ret) goto out; @@ -993,6 +1002,7 @@ start: LOG("Domain %u has shut down, reason code %d 0x%x", domid, event->u.domain_shutdown.shutdown_reason, event->u.domain_shutdown.shutdown_reason); + libxl_unreg_aer_events_handler(ctx, domid); switch (handle_domain_death(&domid, event, &d_config)) { case DOMAIN_RESTART_SOFT_RESET: domid_soft_reset = domid; @@ -1059,6 +1069,7 @@ start: case LIBXL_EVENT_TYPE_DOMAIN_DEATH: LOG("Domain %u has been destroyed.", domid); + libxl_unreg_aer_events_handler(ctx, domid); libxl_event_free(ctx, event); ret = 0; goto out; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |