]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/arm/include/asm/xen/interface.h
1 /******************************************************************************
2 * Guest OS interface to ARM Xen.
4 * Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Citrix, 2012
7 #ifndef _ASM_ARM_XEN_INTERFACE_H
8 #define _ASM_ARM_XEN_INTERFACE_H
10 #include <linux/types.h>
12 #define uint64_aligned_t uint64_t __attribute__((aligned(8)))
14 #define __DEFINE_GUEST_HANDLE(name, type) \
15 typedef struct { union { type *p; uint64_aligned_t q; }; } \
16 __guest_handle_ ## name
18 #define DEFINE_GUEST_HANDLE_STRUCT(name) \
19 __DEFINE_GUEST_HANDLE(name, struct name)
20 #define DEFINE_GUEST_HANDLE(name) __DEFINE_GUEST_HANDLE(name, name)
21 #define GUEST_HANDLE(name) __guest_handle_ ## name
23 #define set_xen_guest_handle(hnd, val) \
25 if (sizeof(hnd) == 8) \
26 *(uint64_t *)&(hnd) = 0; \
31 /* Explicitly size integers that represent pfns in the interface with
32 * Xen so that we can have one ABI that works for 32 and 64 bit guests. */
33 typedef uint64_t xen_pfn_t
;
34 #define PRI_xen_pfn "llx"
35 typedef uint64_t xen_ulong_t
;
36 #define PRI_xen_ulong "llx"
37 /* Guest handles for primitive C types. */
38 __DEFINE_GUEST_HANDLE(uchar
, unsigned char);
39 __DEFINE_GUEST_HANDLE(uint
, unsigned int);
40 DEFINE_GUEST_HANDLE(char);
41 DEFINE_GUEST_HANDLE(int);
42 DEFINE_GUEST_HANDLE(void);
43 DEFINE_GUEST_HANDLE(uint64_t);
44 DEFINE_GUEST_HANDLE(uint32_t);
45 DEFINE_GUEST_HANDLE(xen_pfn_t
);
47 /* Maximum number of virtual CPUs in multi-processor guests. */
48 #define MAX_VIRT_CPUS 1
50 struct arch_vcpu_info
{ };
51 struct arch_shared_info
{ };
53 /* TODO: Move pvclock definitions some place arch independent */
54 struct pvclock_vcpu_time_info
{
59 u32 tsc_to_system_mul
;
63 } __attribute__((__packed__
)); /* 32 bytes */
65 /* It is OK to have a 12 bytes struct with no padding because it is packed */
66 struct pvclock_wall_clock
{
70 } __attribute__((__packed__
));
73 #endif /* _ASM_ARM_XEN_INTERFACE_H */