Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
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 /* No need for a barrier -- XCHG is a barrier on x86. */
0024 #define xchg_xen_ulong(ptr, val) xchg((ptr), (val))
0025 
0026 extern bool xen_have_vector_callback;
0027 
0028 /*
0029  * Events delivered via platform PCI interrupts are always
0030  * routed to vcpu 0 and hence cannot be rebound.
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 /* _ASM_X86_XEN_EVENTS_H */