]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - arch/x86/include/asm/xen/events.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / arch / x86 / include / asm / xen / events.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
05e4d316
PA
2#ifndef _ASM_X86_XEN_EVENTS_H
3#define _ASM_X86_XEN_EVENTS_H
e849c3e9
IY
4
5enum ipi_vector {
6 XEN_RESCHEDULE_VECTOR,
7 XEN_CALL_FUNCTION_VECTOR,
3b16cf87 8 XEN_CALL_FUNCTION_SINGLE_VECTOR,
2d9e1e2f 9 XEN_SPIN_UNLOCK_VECTOR,
1ff2b0c3 10 XEN_IRQ_WORK_VECTOR,
6efa20e4 11 XEN_NMI_VECTOR,
e849c3e9
IY
12
13 XEN_NR_IPIS,
14};
15
16static inline int xen_irqs_disabled(struct pt_regs *regs)
17{
18 return raw_irqs_disabled_flags(regs->flags);
19}
20
c81611c4
IC
21/* No need for a barrier -- XCHG is a barrier on x86. */
22#define xchg_xen_ulong(ptr, val) xchg((ptr), (val))
23
84d582d2
BO
24extern int xen_have_vector_callback;
25
26/*
27 * Events delivered via platform PCI interrupts are always
28 * routed to vcpu 0 and hence cannot be rebound.
29 */
30static inline bool xen_support_evtchn_rebind(void)
31{
32 return (!xen_hvm_domain() || xen_have_vector_callback);
33}
34
05e4d316 35#endif /* _ASM_X86_XEN_EVENTS_H */