Print this page
XXXX remove i86xpv platform code
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>


  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #ifndef _SYS_XPV_SUPPORT_H
  28 #define _SYS_XPV_SUPPORT_H
  29 
  30 #ifdef __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #define __XEN_INTERFACE_VERSION__       __XEN_LATEST_INTERFACE_VERSION__
  35 
  36 #if !defined(_ASM)
  37 
  38 #include <sys/types.h>
  39 #include <sys/inttypes.h>
  40 #include <sys/dditypes.h>
  41 #include <sys/xpv_impl.h>
  42 #include <sys/xen_mmu.h>
  43 








  44 #define IPL_DEBUG       15      /* domain debug interrupt */
  45 #define IPL_CONS        9
  46 #define IPL_VIF         6
  47 #define IPL_VBD         5
  48 #define IPL_EVTCHN      1
  49 
  50 #define INVALID_EVTCHN 0
  51 
  52 typedef uint_t (*ec_handler_fcn_t)();
  53 
  54 extern int ec_init(void);
  55 extern void ec_fini();
  56 extern void ec_bind_evtchn_to_handler(int, pri_t, ec_handler_fcn_t, void *);
  57 extern void ec_unbind_evtchn(int);
  58 extern void ec_notify_via_evtchn(uint_t);
  59 extern void hypervisor_mask_event(uint_t);
  60 extern void hypervisor_unmask_event(uint_t);
  61 
  62 extern void xen_hvm_init(void);
  63 extern int xen_bind_interdomain(int, int, int *);
  64 extern int xen_alloc_unbound_evtchn(int, int *);
  65 extern int xen_xlate_errcode(int error);
  66 extern void *xen_alloc_pages(pgcnt_t cnt);
  67 extern void kbm_map_ma(maddr_t ma, uintptr_t va, uint_t level);
  68 
  69 /*
  70  * Stub functions to allow the FE drivers to build without littering them
  71  * with #ifdefs
  72  */
  73 extern void balloon_drv_added(int64_t);
  74 extern long balloon_free_pages(uint_t, mfn_t *, caddr_t, pfn_t *);
  75 extern void xen_release_pfn(pfn_t);
  76 extern void reassign_pfn(pfn_t, mfn_t);
  77 
  78 extern shared_info_t *HYPERVISOR_shared_info;
  79 extern pfn_t xen_shared_info_frame;
  80 
  81 /*
  82  * Argument to xpv_feature(). This function will return -1 if a feature
  83  * is not available, 1 if a boolean feature is available, and a value >= 0
  84  * if a numeric value is requested.
  85  */
  86 #define XPVF_BITS               0       /* numeric (32 or 64) */
  87 #define XPVF_VERSION_MAJOR      1       /* numeric */
  88 #define XPVF_VERSION_MINOR      2       /* numeric */
  89 #define XPVF_HYPERCALLS         3       /* boolean (hypercalls work) */
  90 #define XPVF_SHARED_INFO        4       /* boolean (shared info is valid) */
  91 #define XPVF_TLB_FLUSH          5       /* boolean (tlb flush call present) */
  92 
  93 extern int xpv_feature(int);
  94 
  95 #define IN_XPV_PANIC()  (__lintzero)
  96 
  97 #ifdef __cplusplus
  98 }


  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #ifndef _SYS_XPV_SUPPORT_H
  28 #define _SYS_XPV_SUPPORT_H
  29 
  30 #ifdef __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #define __XEN_INTERFACE_VERSION__       __XEN_LATEST_INTERFACE_VERSION__
  35 
  36 #if !defined(_ASM)
  37 
  38 #include <sys/types.h>
  39 #include <sys/inttypes.h>
  40 #include <sys/dditypes.h>


  41 
  42 /*
  43  * XXX These originally were in retired xen_mmu.h and are likely to be not
  44  * needed once all of the xpv related code is removed.
  45  */
  46 typedef uint64_t maddr_t;
  47 typedef ulong_t mfn_t;
  48 #define mfn_to_ma(mfn)  ((maddr_t)(mfn) << MMU_PAGESHIFT)
  49 
  50 #define IPL_DEBUG       15      /* domain debug interrupt */
  51 #define IPL_CONS        9
  52 #define IPL_VIF         6
  53 #define IPL_VBD         5
  54 #define IPL_EVTCHN      1
  55 
  56 #define INVALID_EVTCHN 0
  57 
  58 typedef uint_t (*ec_handler_fcn_t)();
  59 
  60 extern int ec_init(void);
  61 extern void ec_fini();
  62 extern void ec_bind_evtchn_to_handler(int, pri_t, ec_handler_fcn_t, void *);
  63 extern void ec_unbind_evtchn(int);
  64 extern void ec_notify_via_evtchn(uint_t);
  65 extern void hypervisor_mask_event(uint_t);
  66 extern void hypervisor_unmask_event(uint_t);
  67 
  68 extern void xen_hvm_init(void);
  69 extern int xen_bind_interdomain(int, int, int *);
  70 extern int xen_alloc_unbound_evtchn(int, int *);
  71 extern int xen_xlate_errcode(int error);
  72 extern void *xen_alloc_pages(pgcnt_t cnt);
  73 extern void kbm_map_ma(maddr_t ma, uintptr_t va, uint_t level);
  74 
  75 /*
  76  * Stub functions to allow the FE drivers to build without littering them
  77  * with #ifdefs
  78  */
  79 extern void balloon_drv_added(int64_t);
  80 extern long balloon_free_pages(uint_t, mfn_t *, caddr_t, pfn_t *);
  81 extern void xen_release_pfn(pfn_t);
  82 extern void reassign_pfn(pfn_t, mfn_t);
  83 

  84 extern pfn_t xen_shared_info_frame;
  85 
  86 /*
  87  * Argument to xpv_feature(). This function will return -1 if a feature
  88  * is not available, 1 if a boolean feature is available, and a value >= 0
  89  * if a numeric value is requested.
  90  */
  91 #define XPVF_BITS               0       /* numeric (32 or 64) */
  92 #define XPVF_VERSION_MAJOR      1       /* numeric */
  93 #define XPVF_VERSION_MINOR      2       /* numeric */
  94 #define XPVF_HYPERCALLS         3       /* boolean (hypercalls work) */
  95 #define XPVF_SHARED_INFO        4       /* boolean (shared info is valid) */
  96 #define XPVF_TLB_FLUSH          5       /* boolean (tlb flush call present) */
  97 
  98 extern int xpv_feature(int);
  99 
 100 #define IN_XPV_PANIC()  (__lintzero)
 101 
 102 #ifdef __cplusplus
 103 }