From 94f641961a18c1038aea467c836de3b8d1e482f4 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Mon, 19 May 2008 22:13:33 +0900 Subject: [PATCH] --- yaml --- r: 104507 b: refs/heads/master c: 3e0879deb700f322f6c81ab34f056fc72d15ec02 h: refs/heads/master i: 104505: d03ae22d22f9860e8a39943b88bad2da257f9294 104503: 9f7631fe7ee77e8480a50a1a71bde74bad0b79a6 v: v3 --- [refs] | 2 +- trunk/arch/ia64/kernel/head.S | 41 +++++++++++++++++++++++++++++++ trunk/include/asm-ia64/paravirt.h | 3 +++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index cca2b16e4143..c4fbaa13498f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 90aeb169c03a96e22674741f08054023c33d595b +refs/heads/master: 3e0879deb700f322f6c81ab34f056fc72d15ec02 diff --git a/trunk/arch/ia64/kernel/head.S b/trunk/arch/ia64/kernel/head.S index ddeab4e36fd5..db540e58c783 100644 --- a/trunk/arch/ia64/kernel/head.S +++ b/trunk/arch/ia64/kernel/head.S @@ -26,11 +26,14 @@ #include #include #include +#include #include #include #include #include #include +#include +#include #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/trunk/include/asm-ia64/paravirt.h b/trunk/include/asm-ia64/paravirt.h index 26b43342308e..1032b216aea6 100644 --- a/trunk/include/asm-ia64/paravirt.h +++ b/trunk/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