Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/include/xen/xen-os.h
Show All 30 Lines | |||||
#define _MACHINE_X86_XEN_XEN_OS_H_ | #define _MACHINE_X86_XEN_XEN_OS_H_ | ||||
/* x86 is lucky and can simply use the default */ | /* x86 is lucky and can simply use the default */ | ||||
#define VM_MEMATTR_XEN_SHARED VM_MEMATTR_DEFAULT | #define VM_MEMATTR_XEN_SHARED VM_MEMATTR_DEFAULT | ||||
/* 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; | ||||
static inline u_int | |||||
cpu_to_vcpu_id(u_int cpuid) | |||||
{ | |||||
return (pcpu_find(cpuid)->pc_vcpu_id); | |||||
royger: PCPU_ID_GET please. | |||||
} | |||||
static inline bool | static inline bool | ||||
xen_support_evtchn_rebind(void) | xen_support_evtchn_rebind(void) | ||||
{ | { | ||||
return (!xen_hvm_domain() || xen_vector_callback_enabled); | return (!xen_hvm_domain() || xen_vector_callback_enabled); | ||||
} | } | ||||
Show All 10 Lines |
PCPU_ID_GET please.