The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=0b4f30c2366c658ea158590cfe621b8229a210e3
commit 0b4f30c2366c658ea158590cfe621b8229a210e3 Author: Julien Grall <jul...@xen.org> AuthorDate: 2014-04-04 23:52:05 +0000 Commit: Roger Pau Monné <roy...@freebsd.org> CommitDate: 2021-07-28 15:27:04 +0000 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+free...@m5p.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D29406 --- sys/dev/xen/control/control.c | 2 +- sys/x86/include/xen/xen-os.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c index 57251a10e6eb..f72193edceea 100644 --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -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); diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h index 37463a8b069c..5b3b912e0891 100644 --- a/sys/x86/include/xen/xen-os.h +++ b/sys/x86/include/xen/xen-os.h @@ -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) { _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"