Re: [PATCH v7 02/19] xen: add macro to detect if running as Dom0

看板FB_current作者時間12年前 (2013/12/25 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
On Thursday, December 19, 2013 1:54:39 pm Roger Pau Monne wrote: > --- > sys/xen/xen-os.h | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h > index c7474d8..e8a5a99 100644 > --- a/sys/xen/xen-os.h > +++ b/sys/xen/xen-os.h > @@ -82,6 +82,13 @@ xen_hvm_domain(void) > return (xen_domain_type == XEN_HVM_DOMAIN); > } > > +static inline int > +xen_initial_domain(void) > +{ > + return (xen_domain() && HYPERVISOR_start_info && > + HYPERVISOR_start_info->flags & SIF_INITDOMAIN); > +} > + > #ifndef xen_mb > #define xen_mb() mb() > #endif This looks fine to me. -- John Baldwin _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1IkSlV0g (FB_current)
文章代碼(AID): #1IkSlV0g (FB_current)