1 /******************************************************************************
2  * xlat.c
3  */
4 
5 #include <xen/compat.h>
6 #include <xen/lib.h>
7 #include <compat/xen.h>
8 #include <compat/event_channel.h>
9 #include <compat/vcpu.h>
10 
11 /* In-place translation functons: */
xlat_start_info(struct start_info * native,enum XLAT_start_info_console console)12 void xlat_start_info(struct start_info *native,
13                      enum XLAT_start_info_console console)
14 {
15     struct compat_start_info *compat = (void *)native;
16 
17     BUILD_BUG_ON(sizeof(*native) < sizeof(*compat));
18     XLAT_start_info(compat, native);
19 }
20 
xlat_vcpu_runstate_info(struct vcpu_runstate_info * native)21 void xlat_vcpu_runstate_info(struct vcpu_runstate_info *native)
22 {
23     struct compat_vcpu_runstate_info *compat = (void *)native;
24 
25     BUILD_BUG_ON(sizeof(*native) < sizeof(*compat));
26     XLAT_vcpu_runstate_info(compat, native);
27 }
28 
29 #define xen_dom0_vga_console_info dom0_vga_console_info
30 CHECK_dom0_vga_console_info;
31 #undef dom0_vga_console_info
32 
33 #define xen_evtchn_alloc_unbound evtchn_alloc_unbound
34 #define xen_evtchn_bind_interdomain evtchn_bind_interdomain
35 #define xen_evtchn_bind_ipi evtchn_bind_ipi
36 #define xen_evtchn_bind_pirq evtchn_bind_pirq
37 #define xen_evtchn_bind_vcpu evtchn_bind_vcpu
38 #define xen_evtchn_bind_virq evtchn_bind_virq
39 #define xen_evtchn_close evtchn_close
40 #define xen_evtchn_op evtchn_op
41 #define xen_evtchn_send evtchn_send
42 #define xen_evtchn_status evtchn_status
43 #define xen_evtchn_unmask evtchn_unmask
44 CHECK_evtchn_op;
45 #undef xen_evtchn_alloc_unbound
46 #undef xen_evtchn_bind_interdomain
47 #undef xen_evtchn_bind_ipi
48 #undef xen_evtchn_bind_pirq
49 #undef xen_evtchn_bind_vcpu
50 #undef xen_evtchn_bind_virq
51 #undef xen_evtchn_close
52 #undef xen_evtchn_op
53 #undef xen_evtchn_send
54 #undef xen_evtchn_status
55 #undef xen_evtchn_unmask
56 
57 #define xen_evtchn_expand_array evtchn_expand_array
58 CHECK_evtchn_expand_array;
59 #undef xen_evtchn_expand_array
60 
61 #define xen_evtchn_init_control evtchn_init_control
62 CHECK_evtchn_init_control;
63 #undef xen_evtchn_init_control
64 
65 #define xen_evtchn_reset evtchn_reset
66 CHECK_evtchn_reset;
67 #undef xen_evtchn_reset
68 
69 #define xen_evtchn_set_priority evtchn_set_priority
70 CHECK_evtchn_set_priority;
71 #undef xen_evtchn_set_priority
72 
73 #define xen_mmu_update mmu_update
74 CHECK_mmu_update;
75 #undef xen_mmu_update
76 
77 #define xen_vcpu_time_info vcpu_time_info
78 CHECK_vcpu_time_info;
79 #undef xen_vcpu_time_info
80 
81 /*
82  * Local variables:
83  * mode: C
84  * c-file-style: "BSD"
85  * c-basic-offset: 4
86  * tab-width: 4
87  * indent-tabs-mode: nil
88  * End:
89  */
90