The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/xen/xen-os.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /******************************************************************************
    2  * xen/xen-os.h
    3  * 
    4  * Random collection of macros and definition
    5  *
    6  * Copyright (c) 2003, 2004 Keir Fraser (on behalf of the Xen team)
    7  * All rights reserved.
    8  *
    9  * Permission is hereby granted, free of charge, to any person obtaining a copy
   10  * of this software and associated documentation files (the "Software"), to
   11  * deal in the Software without restriction, including without limitation the
   12  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
   13  * sell copies of the Software, and to permit persons to whom the Software is
   14  * furnished to do so, subject to the following conditions:
   15  * 
   16  * The above copyright notice and this permission notice shall be included in
   17  * all copies or substantial portions of the Software.
   18  * 
   19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
   20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
   21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
   22  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
   23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
   24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
   25  * DEALINGS IN THE SOFTWARE.
   26  *
   27  * $FreeBSD: releng/10.4/sys/xen/xen-os.h 315676 2017-03-21 09:38:59Z royger $
   28  */
   29 
   30 #ifndef _XEN_XEN_OS_H_
   31 #define _XEN_XEN_OS_H_
   32 
   33 #if !defined(__XEN_INTERFACE_VERSION__)  
   34 #define  __XEN_INTERFACE_VERSION__ 0x00030208
   35 #endif  
   36 
   37 #define GRANT_REF_INVALID   0xffffffff
   38 
   39 #ifdef LOCORE
   40 #define __ASSEMBLY__
   41 #endif
   42 
   43 #include <machine/xen/xen-os.h>
   44 
   45 #include <xen/interface/xen.h>
   46 
   47 /* Everything below this point is not included by assembler (.S) files. */
   48 #ifndef __ASSEMBLY__
   49 
   50 /* Force a proper event-channel callback from Xen. */
   51 void force_evtchn_callback(void);
   52 
   53 extern shared_info_t *HYPERVISOR_shared_info;
   54 
   55 #ifdef XENHVM
   56 extern int xen_disable_pv_disks;
   57 extern int xen_disable_pv_nics;
   58 #endif
   59 
   60 extern bool xen_suspend_cancelled;
   61 
   62 enum xen_domain_type {
   63         XEN_NATIVE,             /* running on bare hardware    */
   64         XEN_PV_DOMAIN,          /* running in a PV domain      */
   65         XEN_HVM_DOMAIN,         /* running in a Xen hvm domain */
   66 };
   67 
   68 extern enum xen_domain_type xen_domain_type;
   69 
   70 static inline int
   71 xen_domain(void)
   72 {
   73         return (xen_domain_type != XEN_NATIVE);
   74 }
   75 
   76 static inline int
   77 xen_pv_domain(void)
   78 {
   79         return (xen_domain_type == XEN_PV_DOMAIN);
   80 }
   81 
   82 static inline int
   83 xen_hvm_domain(void)
   84 {
   85         return (xen_domain_type == XEN_HVM_DOMAIN);
   86 }
   87 
   88 #ifndef xen_mb
   89 #define xen_mb() mb()
   90 #endif
   91 #ifndef xen_rmb
   92 #define xen_rmb() rmb()
   93 #endif
   94 #ifndef xen_wmb
   95 #define xen_wmb() wmb()
   96 #endif
   97 
   98 #endif /* !__ASSEMBLY__ */
   99 
  100 #endif /* _XEN_XEN_OS_H_ */

Cache object: bfb32a8ef20b09be61c1492af64dd780


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.