|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
[Xen-ia64-devel] [PATCH 02/15] ia64/xen: short-circuit tests for dom0
This patch is ia64 counter part of clean up of the xen predicates.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
arch/ia64/include/asm/xen/hypervisor.h | 39 ++++++++++++++-----------------
1 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/arch/ia64/include/asm/xen/hypervisor.h
b/arch/ia64/include/asm/xen/hypervisor.h
index 7a804e8..e425227 100644
--- a/arch/ia64/include/asm/xen/hypervisor.h
+++ b/arch/ia64/include/asm/xen/hypervisor.h
@@ -33,9 +33,6 @@
#ifndef _ASM_IA64_XEN_HYPERVISOR_H
#define _ASM_IA64_XEN_HYPERVISOR_H
-#ifdef CONFIG_XEN
-
-#include <linux/init.h>
#include <xen/interface/xen.h>
#include <xen/interface/version.h> /* to compile feature.c */
#include <xen/features.h> /* to comiple xen-netfront.c */
@@ -43,22 +40,32 @@
/* xen_domain_type is set before executing any C code by early_xen_setup */
enum xen_domain_type {
- XEN_NATIVE,
- XEN_PV_DOMAIN,
- XEN_HVM_DOMAIN,
+ XEN_NATIVE, /* running on bare hardware */
+ XEN_PV_DOMAIN, /* running in a PV domain */
+ XEN_HVM_DOMAIN, /* running in a Xen hvm domain*/
};
+#ifdef CONFIG_XEN
extern enum xen_domain_type xen_domain_type;
+#else
+#define xen_domain_type XEN_NATIVE
+#endif
#define xen_domain() (xen_domain_type != XEN_NATIVE)
-#define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN)
-#define xen_initial_domain() (xen_pv_domain() && \
+#define xen_pv_domain() (xen_domain() &&
\
+ xen_domain_type == XEN_PV_DOMAIN)
+#define xen_hvm_domain() (xen_domain() && \
+ xen_domain_type == XEN_HVM_DOMAIN)
+
+#ifdef CONFIG_XEN_DOM0
+#define xen_initial_domain() (xen_pv_domain() && \
(xen_start_info->flags & SIF_INITDOMAIN))
-#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN)
+#else
+#define xen_initial_domain() (0)
+#endif
-/* deprecated. remove this */
-#define is_running_on_xen() (xen_domain_type == XEN_PV_DOMAIN)
+#ifdef CONFIG_XEN
extern struct shared_info *HYPERVISOR_shared_info;
extern struct start_info *xen_start_info;
@@ -74,16 +81,6 @@ void force_evtchn_callback(void);
/* For setup_arch() in arch/ia64/kernel/setup.c */
void xen_ia64_enable_opt_feature(void);
-
-#else /* CONFIG_XEN */
-
-#define xen_domain() (0)
-#define xen_pv_domain() (0)
-#define xen_initial_domain() (0)
-#define xen_hvm_domain() (0)
-#define is_running_on_xen() (0) /* deprecated. remove this */
#endif
-#define is_initial_xendomain() (0) /* deprecated. remove this */
-
#endif /* _ASM_IA64_XEN_HYPERVISOR_H */
--
1.6.0.2
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-ia64-devel] [PATCH 00/15] ia64/pv_ops, xen: more paravirtualization. TAKE 5, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 06/15] ia64/pv_ops/pvchecker: support mov = ar.itc paravirtualization, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 14/15] ia64/pv_ops: paravirtualize gate.S., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 07/15] ia64/pv_ops: paravirtualize mov = ar.itc., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 13/15] ia64/pv_ops: move down __kernel_syscall_via_epc., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 15/15] ia64/pv_ops/xen/gate.S: xen gate page paravirtualization, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 01/15] ia64/pv_ops/xen: use __initconst instead of __initdata for const data, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 08/15] ia64/pv_ops/xen: paravirtualize read/write ar.itc and ar.itm, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 02/15] ia64/xen: short-circuit tests for dom0,
Isaku Yamahata <=
- [Xen-ia64-devel] [PATCH 04/15] ia64/pv_ops/xen: preliminary to paravirtualizing fsys.S for xen., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 10/15] ia64/pv_ops/xen/pv_time_ops: implement sched_clock., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 09/15] ia64/pv_ops/pv_time_ops: add sched_clock hook., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 05/15] ia64/pv_ops: paravirtualize fsys.S., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 03/15] ia64/pv_ops: add hooks to paravirtualize fsyscall implementation., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 12/15] ia64/pv_ops/xen: define xen specific gate page., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 11/15] ia64/pv_ops: gate page paravirtualization., Isaku Yamahata
|
|
|
|
|