~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/xen/xen.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _XEN_XEN_H
  3 #define _XEN_XEN_H
  4 
  5 #include <linux/types.h>
  6 
  7 enum xen_domain_type {
  8         XEN_NATIVE,             /* running on bare hardware    */
  9         XEN_PV_DOMAIN,          /* running in a PV domain      */
 10         XEN_HVM_DOMAIN,         /* running in a Xen hvm domain */
 11 };
 12 
 13 #ifdef CONFIG_XEN
 14 extern enum xen_domain_type xen_domain_type;
 15 #else
 16 #define xen_domain_type         XEN_NATIVE
 17 #endif
 18 
 19 #ifdef CONFIG_XEN_PVH
 20 extern bool xen_pvh;
 21 #else
 22 #define xen_pvh                 0
 23 #endif
 24 
 25 #define xen_domain()            (xen_domain_type != XEN_NATIVE)
 26 #define xen_pv_domain()         (xen_domain_type == XEN_PV_DOMAIN)
 27 #define xen_hvm_domain()        (xen_domain_type == XEN_HVM_DOMAIN)
 28 #define xen_pvh_domain()        (xen_pvh)
 29 
 30 extern uint32_t xen_start_flags;
 31 
 32 #ifdef CONFIG_XEN_PV
 33 extern bool xen_pv_pci_possible;
 34 #else
 35 #define xen_pv_pci_possible     0
 36 #endif
 37 
 38 #include <xen/interface/hvm/start_info.h>
 39 extern struct hvm_start_info pvh_start_info;
 40 void xen_prepare_pvh(void);
 41 struct pt_regs;
 42 void xen_pv_evtchn_do_upcall(struct pt_regs *regs);
 43 
 44 #ifdef CONFIG_XEN_DOM0
 45 #include <xen/interface/xen.h>
 46 #include <asm/xen/hypervisor.h>
 47 
 48 #define xen_initial_domain()    (xen_domain() && \
 49                                  (xen_start_flags & SIF_INITDOMAIN))
 50 #else  /* !CONFIG_XEN_DOM0 */
 51 #define xen_initial_domain()    (0)
 52 #endif  /* CONFIG_XEN_DOM0 */
 53 
 54 struct bio_vec;
 55 struct page;
 56 
 57 bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
 58                 const struct page *page);
 59 
 60 #if defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_XEN_BALLOON)
 61 extern u64 xen_saved_max_mem_size;
 62 #endif
 63 
 64 #ifdef CONFIG_XEN_UNPOPULATED_ALLOC
 65 int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages);
 66 void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages);
 67 #include <linux/ioport.h>
 68 int arch_xen_unpopulated_init(struct resource **res);
 69 #else
 70 #include <xen/balloon.h>
 71 static inline int xen_alloc_unpopulated_pages(unsigned int nr_pages,
 72                 struct page **pages)
 73 {
 74         return xen_alloc_ballooned_pages(nr_pages, pages);
 75 }
 76 static inline void xen_free_unpopulated_pages(unsigned int nr_pages,
 77                 struct page **pages)
 78 {
 79         xen_free_ballooned_pages(nr_pages, pages);
 80 }
 81 #endif
 82 
 83 #if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI) && defined(CONFIG_X86)
 84 bool __init xen_processor_present(uint32_t acpi_id);
 85 #else
 86 #include <linux/bug.h>
 87 static inline bool xen_processor_present(uint32_t acpi_id)
 88 {
 89         BUG();
 90         return false;
 91 }
 92 #endif
 93 
 94 #endif  /* _XEN_XEN_H */
 95 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php