Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / include / mach-xen / asm / hypercall_32.h
1 #define HYPERCALL_arg1 "ebx"
2 #define HYPERCALL_arg2 "ecx"
3 #define HYPERCALL_arg3 "edx"
4 #define HYPERCALL_arg4 "esi"
5 #define HYPERCALL_arg5 "edi"
6
7 #if CONFIG_XEN_COMPAT <= 0x030002
8 static inline int __must_check
9 HYPERVISOR_set_callbacks(
10         unsigned long event_selector, unsigned long event_address,
11         unsigned long failsafe_selector, unsigned long failsafe_address)
12 {
13         return _hypercall4(int, set_callbacks,
14                            event_selector, event_address,
15                            failsafe_selector, failsafe_address);
16 }
17 #endif
18
19 static inline long __must_check
20 HYPERVISOR_set_timer_op(
21         u64 timeout)
22 {
23         return _hypercall2(long, set_timer_op,
24                            (unsigned long)timeout,
25                            (unsigned long)(timeout>>32));
26 }
27
28 static inline int __must_check
29 HYPERVISOR_update_descriptor(
30         u64 ma, u64 desc)
31 {
32         return _hypercall4(int, update_descriptor,
33                            (unsigned long)ma, (unsigned long)(ma>>32),
34                            (unsigned long)desc, (unsigned long)(desc>>32));
35 }
36
37 static inline int __must_check
38 HYPERVISOR_update_va_mapping(
39         unsigned long va, pte_t new_val, unsigned long flags)
40 {
41         unsigned long pte_hi = 0;
42
43         if (arch_use_lazy_mmu_mode())
44                 return xen_multi_update_va_mapping(va, new_val, flags);
45 #ifdef CONFIG_X86_PAE
46         pte_hi = new_val.pte_high;
47 #endif
48         return _hypercall4(int, update_va_mapping, va,
49                            new_val.pte_low, pte_hi, flags);
50 }
51
52 static inline int __must_check
53 HYPERVISOR_update_va_mapping_otherdomain(
54         unsigned long va, pte_t new_val, unsigned long flags, domid_t domid)
55 {
56         unsigned long pte_hi = 0;
57 #ifdef CONFIG_X86_PAE
58         pte_hi = new_val.pte_high;
59 #endif
60         return _hypercall5(int, update_va_mapping_otherdomain, va,
61                            new_val.pte_low, pte_hi, flags, domid);
62 }