diff options
Diffstat (limited to 'include/asm-x86/xen')
-rw-r--r-- | include/asm-x86/xen/events.h | 6 | ||||
-rw-r--r-- | include/asm-x86/xen/grant_table.h | 6 | ||||
-rw-r--r-- | include/asm-x86/xen/hypercall.h | 6 | ||||
-rw-r--r-- | include/asm-x86/xen/hypervisor.h | 20 | ||||
-rw-r--r-- | include/asm-x86/xen/interface.h | 6 | ||||
-rw-r--r-- | include/asm-x86/xen/interface_32.h | 6 | ||||
-rw-r--r-- | include/asm-x86/xen/interface_64.h | 6 | ||||
-rw-r--r-- | include/asm-x86/xen/page.h | 10 |
8 files changed, 38 insertions, 28 deletions
diff --git a/include/asm-x86/xen/events.h b/include/asm-x86/xen/events.h index 8ded74720024..8151f5b8b6cb 100644 --- a/include/asm-x86/xen/events.h +++ b/include/asm-x86/xen/events.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __XEN_EVENTS_H | 1 | #ifndef ASM_X86__XEN__EVENTS_H |
2 | #define __XEN_EVENTS_H | 2 | #define ASM_X86__XEN__EVENTS_H |
3 | 3 | ||
4 | enum ipi_vector { | 4 | enum ipi_vector { |
5 | XEN_RESCHEDULE_VECTOR, | 5 | XEN_RESCHEDULE_VECTOR, |
@@ -21,4 +21,4 @@ static inline void xen_do_IRQ(int irq, struct pt_regs *regs) | |||
21 | do_IRQ(regs); | 21 | do_IRQ(regs); |
22 | } | 22 | } |
23 | 23 | ||
24 | #endif /* __XEN_EVENTS_H */ | 24 | #endif /* ASM_X86__XEN__EVENTS_H */ |
diff --git a/include/asm-x86/xen/grant_table.h b/include/asm-x86/xen/grant_table.h index 2444d4593a3b..c4baab4d2b68 100644 --- a/include/asm-x86/xen/grant_table.h +++ b/include/asm-x86/xen/grant_table.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __XEN_GRANT_TABLE_H | 1 | #ifndef ASM_X86__XEN__GRANT_TABLE_H |
2 | #define __XEN_GRANT_TABLE_H | 2 | #define ASM_X86__XEN__GRANT_TABLE_H |
3 | 3 | ||
4 | #define xen_alloc_vm_area(size) alloc_vm_area(size) | 4 | #define xen_alloc_vm_area(size) alloc_vm_area(size) |
5 | #define xen_free_vm_area(area) free_vm_area(area) | 5 | #define xen_free_vm_area(area) free_vm_area(area) |
6 | 6 | ||
7 | #endif /* __XEN_GRANT_TABLE_H */ | 7 | #endif /* ASM_X86__XEN__GRANT_TABLE_H */ |
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h index 91cb7fd5c123..44f4259bee3f 100644 --- a/include/asm-x86/xen/hypercall.h +++ b/include/asm-x86/xen/hypercall.h | |||
@@ -30,8 +30,8 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifndef __HYPERCALL_H__ | 33 | #ifndef ASM_X86__XEN__HYPERCALL_H |
34 | #define __HYPERCALL_H__ | 34 | #define ASM_X86__XEN__HYPERCALL_H |
35 | 35 | ||
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/string.h> | 37 | #include <linux/string.h> |
@@ -524,4 +524,4 @@ MULTI_stack_switch(struct multicall_entry *mcl, | |||
524 | mcl->args[1] = esp; | 524 | mcl->args[1] = esp; |
525 | } | 525 | } |
526 | 526 | ||
527 | #endif /* __HYPERCALL_H__ */ | 527 | #endif /* ASM_X86__XEN__HYPERCALL_H */ |
diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h index 04ee0610014a..445a24759560 100644 --- a/include/asm-x86/xen/hypervisor.h +++ b/include/asm-x86/xen/hypervisor.h | |||
@@ -30,8 +30,8 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifndef __HYPERVISOR_H__ | 33 | #ifndef ASM_X86__XEN__HYPERVISOR_H |
34 | #define __HYPERVISOR_H__ | 34 | #define ASM_X86__XEN__HYPERVISOR_H |
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
@@ -54,7 +54,6 @@ | |||
54 | /* arch/i386/kernel/setup.c */ | 54 | /* arch/i386/kernel/setup.c */ |
55 | extern struct shared_info *HYPERVISOR_shared_info; | 55 | extern struct shared_info *HYPERVISOR_shared_info; |
56 | extern struct start_info *xen_start_info; | 56 | extern struct start_info *xen_start_info; |
57 | #define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) | ||
58 | 57 | ||
59 | /* arch/i386/mach-xen/evtchn.c */ | 58 | /* arch/i386/mach-xen/evtchn.c */ |
60 | /* Force a proper event-channel callback from Xen. */ | 59 | /* Force a proper event-channel callback from Xen. */ |
@@ -67,6 +66,17 @@ u64 jiffies_to_st(unsigned long jiffies); | |||
67 | #define MULTI_UVMFLAGS_INDEX 3 | 66 | #define MULTI_UVMFLAGS_INDEX 3 |
68 | #define MULTI_UVMDOMID_INDEX 4 | 67 | #define MULTI_UVMDOMID_INDEX 4 |
69 | 68 | ||
70 | #define is_running_on_xen() (xen_start_info ? 1 : 0) | 69 | enum xen_domain_type { |
70 | XEN_NATIVE, | ||
71 | XEN_PV_DOMAIN, | ||
72 | XEN_HVM_DOMAIN, | ||
73 | }; | ||
71 | 74 | ||
72 | #endif /* __HYPERVISOR_H__ */ | 75 | extern enum xen_domain_type xen_domain_type; |
76 | |||
77 | #define xen_domain() (xen_domain_type != XEN_NATIVE) | ||
78 | #define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN) | ||
79 | #define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN) | ||
80 | #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) | ||
81 | |||
82 | #endif /* ASM_X86__XEN__HYPERVISOR_H */ | ||
diff --git a/include/asm-x86/xen/interface.h b/include/asm-x86/xen/interface.h index 9d810f2538a2..d077bba96da9 100644 --- a/include/asm-x86/xen/interface.h +++ b/include/asm-x86/xen/interface.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * Copyright (c) 2004, K A Fraser | 6 | * Copyright (c) 2004, K A Fraser |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __ASM_X86_XEN_INTERFACE_H | 9 | #ifndef ASM_X86__XEN__INTERFACE_H |
10 | #define __ASM_X86_XEN_INTERFACE_H | 10 | #define ASM_X86__XEN__INTERFACE_H |
11 | 11 | ||
12 | #ifdef __XEN__ | 12 | #ifdef __XEN__ |
13 | #define __DEFINE_GUEST_HANDLE(name, type) \ | 13 | #define __DEFINE_GUEST_HANDLE(name, type) \ |
@@ -172,4 +172,4 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_guest_context); | |||
172 | #define XEN_CPUID XEN_EMULATE_PREFIX "cpuid" | 172 | #define XEN_CPUID XEN_EMULATE_PREFIX "cpuid" |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | #endif /* __ASM_X86_XEN_INTERFACE_H */ | 175 | #endif /* ASM_X86__XEN__INTERFACE_H */ |
diff --git a/include/asm-x86/xen/interface_32.h b/include/asm-x86/xen/interface_32.h index d8ac41d5db86..08167e19fc66 100644 --- a/include/asm-x86/xen/interface_32.h +++ b/include/asm-x86/xen/interface_32.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * Copyright (c) 2004, K A Fraser | 6 | * Copyright (c) 2004, K A Fraser |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __ASM_X86_XEN_INTERFACE_32_H | 9 | #ifndef ASM_X86__XEN__INTERFACE_32_H |
10 | #define __ASM_X86_XEN_INTERFACE_32_H | 10 | #define ASM_X86__XEN__INTERFACE_32_H |
11 | 11 | ||
12 | 12 | ||
13 | /* | 13 | /* |
@@ -94,4 +94,4 @@ typedef struct xen_callback xen_callback_t; | |||
94 | #define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20)) | 94 | #define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20)) |
95 | #define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20)) | 95 | #define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20)) |
96 | 96 | ||
97 | #endif /* __ASM_X86_XEN_INTERFACE_32_H */ | 97 | #endif /* ASM_X86__XEN__INTERFACE_32_H */ |
diff --git a/include/asm-x86/xen/interface_64.h b/include/asm-x86/xen/interface_64.h index 842266ce96e6..046c0f1e01d4 100644 --- a/include/asm-x86/xen/interface_64.h +++ b/include/asm-x86/xen/interface_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_X86_XEN_INTERFACE_64_H | 1 | #ifndef ASM_X86__XEN__INTERFACE_64_H |
2 | #define __ASM_X86_XEN_INTERFACE_64_H | 2 | #define ASM_X86__XEN__INTERFACE_64_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * 64-bit segment selectors | 5 | * 64-bit segment selectors |
@@ -156,4 +156,4 @@ typedef unsigned long xen_callback_t; | |||
156 | #endif /* !__ASSEMBLY__ */ | 156 | #endif /* !__ASSEMBLY__ */ |
157 | 157 | ||
158 | 158 | ||
159 | #endif /* __ASM_X86_XEN_INTERFACE_64_H */ | 159 | #endif /* ASM_X86__XEN__INTERFACE_64_H */ |
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index 7b3835d3b77d..d5eada0a48d9 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __XEN_PAGE_H | 1 | #ifndef ASM_X86__XEN__PAGE_H |
2 | #define __XEN_PAGE_H | 2 | #define ASM_X86__XEN__PAGE_H |
3 | 3 | ||
4 | #include <linux/pfn.h> | 4 | #include <linux/pfn.h> |
5 | 5 | ||
@@ -76,13 +76,13 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn) | |||
76 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) | 76 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) |
77 | { | 77 | { |
78 | unsigned offset = phys.paddr & ~PAGE_MASK; | 78 | unsigned offset = phys.paddr & ~PAGE_MASK; |
79 | return XMADDR(PFN_PHYS((u64)pfn_to_mfn(PFN_DOWN(phys.paddr))) | offset); | 79 | return XMADDR(PFN_PHYS(pfn_to_mfn(PFN_DOWN(phys.paddr))) | offset); |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline xpaddr_t machine_to_phys(xmaddr_t machine) | 82 | static inline xpaddr_t machine_to_phys(xmaddr_t machine) |
83 | { | 83 | { |
84 | unsigned offset = machine.maddr & ~PAGE_MASK; | 84 | unsigned offset = machine.maddr & ~PAGE_MASK; |
85 | return XPADDR(PFN_PHYS((u64)mfn_to_pfn(PFN_DOWN(machine.maddr))) | offset); | 85 | return XPADDR(PFN_PHYS(mfn_to_pfn(PFN_DOWN(machine.maddr))) | offset); |
86 | } | 86 | } |
87 | 87 | ||
88 | /* | 88 | /* |
@@ -162,4 +162,4 @@ xmaddr_t arbitrary_virt_to_machine(void *address); | |||
162 | void make_lowmem_page_readonly(void *vaddr); | 162 | void make_lowmem_page_readonly(void *vaddr); |
163 | void make_lowmem_page_readwrite(void *vaddr); | 163 | void make_lowmem_page_readwrite(void *vaddr); |
164 | 164 | ||
165 | #endif /* __XEN_PAGE_H */ | 165 | #endif /* ASM_X86__XEN__PAGE_H */ |