Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/include/xen/xen-os.h
Show All 34 Lines | |||||
#endif | #endif | ||||
/* Shared memory needs write-back as its cache attribute for coherency. */ | /* Shared memory needs write-back as its cache attribute for coherency. */ | ||||
#define VM_MEMATTR_XEN VM_MEMATTR_WRITE_BACK | #define VM_MEMATTR_XEN VM_MEMATTR_WRITE_BACK | ||||
/* Everything below this point is not included by assembler (.S) files. */ | /* Everything below this point is not included by assembler (.S) files. */ | ||||
#ifndef __ASSEMBLY__ | #ifndef __ASSEMBLY__ | ||||
#include <sys/pcpu.h> | |||||
/* If non-zero, the hypervisor has been configured to use a direct vector */ | /* If non-zero, the hypervisor has been configured to use a direct vector */ | ||||
extern int xen_vector_callback_enabled; | extern int xen_vector_callback_enabled; | ||||
/* tunable for disabling PV disks */ | /* tunable for disabling PV disks */ | ||||
extern int xen_disable_pv_disks; | extern int xen_disable_pv_disks; | ||||
/* tunable for disabling PV nics */ | /* tunable for disabling PV nics */ | ||||
extern int xen_disable_pv_nics; | extern int xen_disable_pv_nics; | ||||
extern uint32_t xen_cpuid_base; | extern uint32_t xen_cpuid_base; | ||||
royger: PCPU_ID_GET please. | |||||
static inline u_int | |||||
XEN_CPUID_TO_VCPUID(u_int cpuid) | |||||
{ | |||||
return (pcpu_find(cpuid)->pc_vcpu_id); | |||||
} | |||||
static inline bool | static inline bool | ||||
xen_has_percpu_evtchn(void) | xen_has_percpu_evtchn(void) | ||||
{ | { | ||||
return (!xen_hvm_domain() || xen_vector_callback_enabled); | return (!xen_hvm_domain() || xen_vector_callback_enabled); | ||||
} | } | ||||
Show All 17 Lines |
PCPU_ID_GET please.