aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/compat/xlat.c
blob: ffc8f8f50e0df5330b9c3f3d469548ff2175050e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/******************************************************************************
 * xlat.c
 */

#include <xen/compat.h>
#include <xen/lib.h>
#include <compat/xen.h>
#include <compat/event_channel.h>
#include <compat/vcpu.h>

/* In-place translation functons: */
void xlat_start_info(struct start_info *native,
                     enum XLAT_start_info_console console)
{
    struct compat_start_info *compat = (void *)native;

    BUILD_BUG_ON(sizeof(*native) < sizeof(*compat));
    XLAT_start_info(compat, native);
}

void xlat_vcpu_runstate_info(struct vcpu_runstate_info *native)
{
    struct compat_vcpu_runstate_info *compat = (void *)native;

    BUILD_BUG_ON(sizeof(*native) < sizeof(*compat));
    XLAT_vcpu_runstate_info(compat, native);
}

#define xen_dom0_vga_console_info dom0_vga_console_info
CHECK_dom0_vga_console_info;
#undef dom0_vga_console_info

#define xen_evtchn_alloc_unbound evtchn_alloc_unbound
#define xen_evtchn_bind_interdomain evtchn_bind_interdomain
#define xen_evtchn_bind_ipi evtchn_bind_ipi
#define xen_evtchn_bind_pirq evtchn_bind_pirq
#define xen_evtchn_bind_vcpu evtchn_bind_vcpu
#define xen_evtchn_bind_virq evtchn_bind_virq
#define xen_evtchn_close evtchn_close
#define xen_evtchn_op evtchn_op
#define xen_evtchn_send evtchn_send
#define xen_evtchn_status evtchn_status
#define xen_evtchn_unmask evtchn_unmask
CHECK_evtchn_op;
#undef xen_evtchn_alloc_unbound
#undef xen_evtchn_bind_interdomain
#undef xen_evtchn_bind_ipi
#undef xen_evtchn_bind_pirq
#undef xen_evtchn_bind_vcpu
#undef xen_evtchn_bind_virq
#undef xen_evtchn_close
#undef xen_evtchn_op
#undef xen_evtchn_send
#undef xen_evtchn_status
#undef xen_evtchn_unmask

#define xen_mmu_update mmu_update
CHECK_mmu_update;
#undef xen_mmu_update

#define xen_vcpu_time_info vcpu_time_info
CHECK_vcpu_time_info;
#undef xen_vcpu_time_info

/*
 * Local variables:
 * mode: C
 * c-file-style: "BSD"
 * c-basic-offset: 4
 * tab-width: 4
 * indent-tabs-mode: nil
 * End:
 */