xen/control: introduce xen_pv_shutdown_handler()
While x86 only register PV shutdown handler for PV guests. ARM guests are always using HVM and requires the PV shutdown handler. Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D29406
This commit is contained in:
parent
69c6eee756
commit
0b4f30c236
@ -446,7 +446,7 @@ xctrl_attach(device_t dev)
|
||||
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);
|
||||
|
||||
|
@ -49,6 +49,13 @@ extern int xen_disable_pv_disks;
|
||||
/* 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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user