1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_XEN_EVENTS_H
3 #define _ASM_X86_XEN_EVENTS_H
7 XEN_CALL_FUNCTION_VECTOR
,
8 XEN_CALL_FUNCTION_SINGLE_VECTOR
,
9 XEN_SPIN_UNLOCK_VECTOR
,
16 static inline int xen_irqs_disabled(struct pt_regs
*regs
)
18 return raw_irqs_disabled_flags(regs
->flags
);
21 /* No need for a barrier -- XCHG is a barrier on x86. */
22 #define xchg_xen_ulong(ptr, val) xchg((ptr), (val))
24 extern int xen_have_vector_callback
;
27 * Events delivered via platform PCI interrupts are always
28 * routed to vcpu 0 and hence cannot be rebound.
30 static inline bool xen_support_evtchn_rebind(void)
32 return (!xen_hvm_domain() || xen_have_vector_callback
);
35 #endif /* _ASM_X86_XEN_EVENTS_H */