|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
[Xen-ia64-devel] [PATCH 06/17] ia64/pv_ops: add an early setup hook for
This patch adds a setup hook in the very early boot sequence
before start_kernel() to initialize paravirtualization stuff.
The hook will be set by each pv loader code or by using multi entry point.
Signed-off-by: Qing He <qing.he@xxxxxxxxx>
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
arch/ia64/kernel/head.S | 41 +++++++++++++++++++++++++++++++++++++++++
include/asm-ia64/paravirt.h | 3 +++
2 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index ddeab4e..db540e5 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -26,11 +26,14 @@
#include <asm/mmu_context.h>
#include <asm/asm-offsets.h>
#include <asm/pal.h>
+#include <asm/paravirt.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#include <asm/mca_asm.h>
+#include <linux/init.h>
+#include <linux/linkage.h>
#ifdef CONFIG_HOTPLUG_CPU
#define SAL_PSR_BITS_TO_SET \
@@ -367,6 +370,44 @@ start_ap:
;;
(isBP) st8 [r2]=r28 // save the address of the boot param area
passed by the bootloader
+#ifdef CONFIG_PARAVIRT
+
+ movl r14=hypervisor_setup_hooks
+ movl r15=hypervisor_type
+ mov r16=num_hypervisor_hooks
+ ;;
+ ld8 r2=[r15]
+ ;;
+ cmp.ltu p7,p0=r2,r16 // array size check
+ shladd r8=r2,3,r14
+ ;;
+(p7) ld8 r9=[r8]
+ ;;
+(p7) mov b1=r9
+(p7) cmp.ne.unc p7,p0=r9,r0 // no actual branch to NULL
+ ;;
+(p7) br.call.sptk.many rp=b1
+
+ __INITDATA
+
+default_setup_hook = 0 // Currently nothing needs to be done.
+
+ .weak xen_setup_hook
+
+ .global hypervisor_type
+hypervisor_type:
+ data8 PARAVIRT_HYPERVISOR_TYPE_DEFAULT
+
+ // must have the same order with PARAVIRT_HYPERVISOR_TYPE_xxx
+
+hypervisor_setup_hooks:
+ data8 default_setup_hook
+ data8 xen_setup_hook
+num_hypervisor_hooks = (. - hypervisor_setup_hooks) / 8
+ .previous
+
+#endif
+
#ifdef CONFIG_SMP
(isAP) br.call.sptk.many rp=start_secondary
.ret0:
diff --git a/include/asm-ia64/paravirt.h b/include/asm-ia64/paravirt.h
index 26b4334..1032b21 100644
--- a/include/asm-ia64/paravirt.h
+++ b/include/asm-ia64/paravirt.h
@@ -26,6 +26,9 @@
#ifdef CONFIG_PARAVIRT_GUEST
+#define PARAVIRT_HYPERVISOR_TYPE_DEFAULT 0
+#define PARAVIRT_HYPERVISOR_TYPE_XEN 1
+
#ifndef __ASSEMBLY__
#include <asm/hw_irq.h>
--
1.5.3
_______________________________________________
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/17] ia64/pv_ops take 6, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 02/17] ia64/pv_ops: preparation: move the constants, LOAD_OFFSET, to a header file., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 03/17] ia64/pv_ops: preparation: introduce ia64_set_rr0_to_rr4() to make kernel paravirtualization friendly., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 06/17] ia64/pv_ops: add an early setup hook for pv_ops.,
Isaku Yamahata <=
- [Xen-ia64-devel] [PATCH 05/17] ia64/pv_ops: introduce pv_info which describes some random info., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 04/17] ia64/pv_ops: preparation: introduce ia64_get_psr_i() to make kernel paravirtualization friendly., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 14/17] ia64/pv_ops: define initialization hooks, pv_init_ops, for paravirtualized environment., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 13/17] ia64/pv_ops: paravirtualize NR_IRQS, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 12/17] ia64/pv_ops: paravirtualize entry.S, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 15/17] ia64/pv_ops: add hooks, pv_iosapic_ops, to paravirtualize iosapic., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 08/17] ia64/pv_ops: preparation for paravirtulization of hand written assembly code., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 11/17] ia64/pv_ops: paravirtualize ivt.S, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 07/17] ia64/pv_ops: introduce pv_cpu_ops to paravirtualize privileged instructions., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 09/17] ia64/pv_ops: define paravirtualized instructions for native., Isaku Yamahata
|
|
|
|
|