diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -446,7 +446,7 @@ xctrl->xctrl_watch.max_pending = 1; xs_register_watch(&xctrl->xctrl_watch); - if (xen_pv_domain()) + if (xen_pv_shutdown_handler()) EVENTHANDLER_REGISTER(shutdown_final, xen_pv_shutdown_final, NULL, SHUTDOWN_PRI_LAST); diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h --- a/sys/x86/include/xen/xen-os.h +++ b/sys/x86/include/xen/xen-os.h @@ -49,6 +49,13 @@ /* tunable for disabling PV nics */ extern int xen_disable_pv_nics; +static inline bool +xen_pv_shutdown_handler(void) +{ + + return (xen_pv_domain()); +} + static inline bool xen_pv_disks_disabled(void) {