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