ia64/xen-unstable

changeset 17203:b45f3a99a4bb

[IA64] Switch to VPS save/restore for HVM

Replace pal_vp_save/restore with vps_save/restore.
The latter have better performance.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author Alex Williamson <alex.williamson@hp.com>
date Mon Mar 10 11:50:59 2008 -0600 (2008-03-10)
parents e6d6595d29f7
children 7d300a1ea762
files xen/arch/ia64/vmx/vmx_init.c xen/include/asm-ia64/vmx_pal_vsa.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_init.c	Mon Mar 10 11:27:42 2008 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmx_init.c	Mon Mar 10 11:50:59 2008 -0600
     1.3 @@ -52,6 +52,7 @@
     1.4  #include <xen/event.h>
     1.5  #include <asm/vlsapic.h>
     1.6  #include <asm/vhpt.h>
     1.7 +#include <asm/vmx_pal_vsa.h>
     1.8  #include "entry.h"
     1.9  
    1.10  /* Global flag to identify whether Intel vmx feature is on */
    1.11 @@ -308,12 +309,8 @@ vmx_save_state(struct vcpu *v)
    1.12  	u64 status;
    1.13  
    1.14  	BUG_ON(v != current);
    1.15 -	/* FIXME: about setting of pal_proc_vector... time consuming */
    1.16 -	status = ia64_pal_vp_save((u64 *)v->arch.privregs, 0);
    1.17 -	if (status != PAL_STATUS_SUCCESS){
    1.18 -		panic_domain(vcpu_regs(v),"Save vp status failed\n");
    1.19 -	}
    1.20 -
    1.21 +	
    1.22 +	ia64_call_vsa(PAL_VPS_SAVE, v->arch.privregs, 0, 0, 0, 0, 0, 0);
    1.23  
    1.24  	/* Need to save KR when domain switch, though HV itself doesn;t
    1.25  	 * use them.
    1.26 @@ -332,17 +329,12 @@ vmx_save_state(struct vcpu *v)
    1.27  void
    1.28  vmx_load_state(struct vcpu *v)
    1.29  {
    1.30 -	u64 status;
    1.31 -
    1.32  	BUG_ON(v != current);
    1.33  
    1.34  	vmx_load_all_rr(v);
    1.35  
    1.36  	/* vmx_load_all_rr() pins down v->arch.privregs with both dtr/itr*/
    1.37 -	status = ia64_pal_vp_restore((u64 *)v->arch.privregs, 0);
    1.38 -	if (status != PAL_STATUS_SUCCESS){
    1.39 -		panic_domain(vcpu_regs(v),"Restore vp status failed\n");
    1.40 -	}
    1.41 +	ia64_call_vsa(PAL_VPS_RESTORE, v->arch.privregs, 0, 0, 0, 0, 0, 0);
    1.42  
    1.43  	ia64_set_kr(0, v->arch.arch_vmx.vkr[0]);
    1.44  	ia64_set_kr(1, v->arch.arch_vmx.vkr[1]);
     2.1 --- a/xen/include/asm-ia64/vmx_pal_vsa.h	Mon Mar 10 11:27:42 2008 -0600
     2.2 +++ b/xen/include/asm-ia64/vmx_pal_vsa.h	Mon Mar 10 11:50:59 2008 -0600
     2.3 @@ -38,6 +38,8 @@ extern u64 __vsa_base;
     2.4  #define PAL_VPS_SET_PENDING_INTERRUPT       0x1000
     2.5  #define PAL_VPS_THASH               0x1400
     2.6  #define PAL_VPS_TTAG                0x1800
     2.7 +#define PAL_VPS_RESTORE             0x1c00
     2.8 +#define PAL_VPS_SAVE                0x2000
     2.9  
    2.10  #endif /* _PAL_VSA_H_ */
    2.11