0001
0002 #ifndef _ASM_X86_XEN_EVENTS_H
0003 #define _ASM_X86_XEN_EVENTS_H
0004
0005 #include <xen/xen.h>
0006
0007 enum ipi_vector {
0008 XEN_RESCHEDULE_VECTOR,
0009 XEN_CALL_FUNCTION_VECTOR,
0010 XEN_CALL_FUNCTION_SINGLE_VECTOR,
0011 XEN_SPIN_UNLOCK_VECTOR,
0012 XEN_IRQ_WORK_VECTOR,
0013 XEN_NMI_VECTOR,
0014
0015 XEN_NR_IPIS,
0016 };
0017
0018 static inline int xen_irqs_disabled(struct pt_regs *regs)
0019 {
0020 return raw_irqs_disabled_flags(regs->flags);
0021 }
0022
0023
0024 #define xchg_xen_ulong(ptr, val) xchg((ptr), (val))
0025
0026 extern bool xen_have_vector_callback;
0027
0028
0029
0030
0031
0032 static inline bool xen_support_evtchn_rebind(void)
0033 {
0034 return (!xen_hvm_domain() || xen_have_vector_callback);
0035 }
0036
0037 extern bool xen_percpu_upcall;
0038 #endif