[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Switch to VPS save/restore for HVM



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1205171459 21600
# Node ID b45f3a99a4bb27a9497bdcb11da89883505d2c54
# Parent  e6d6595d29f73dd4ee3ebc4b85c89104de456325
[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@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vmx_init.c       |   16 ++++------------
 xen/include/asm-ia64/vmx_pal_vsa.h |    2 ++
 2 files changed, 6 insertions(+), 12 deletions(-)

diff -r e6d6595d29f7 -r b45f3a99a4bb xen/arch/ia64/vmx/vmx_init.c
--- a/xen/arch/ia64/vmx/vmx_init.c      Mon Mar 10 11:27:42 2008 -0600
+++ b/xen/arch/ia64/vmx/vmx_init.c      Mon Mar 10 11:50:59 2008 -0600
@@ -52,6 +52,7 @@
 #include <xen/event.h>
 #include <asm/vlsapic.h>
 #include <asm/vhpt.h>
+#include <asm/vmx_pal_vsa.h>
 #include "entry.h"
 
 /* Global flag to identify whether Intel vmx feature is on */
@@ -308,12 +309,8 @@ vmx_save_state(struct vcpu *v)
        u64 status;
 
        BUG_ON(v != current);
-       /* FIXME: about setting of pal_proc_vector... time consuming */
-       status = ia64_pal_vp_save((u64 *)v->arch.privregs, 0);
-       if (status != PAL_STATUS_SUCCESS){
-               panic_domain(vcpu_regs(v),"Save vp status failed\n");
-       }
-
+       
+       ia64_call_vsa(PAL_VPS_SAVE, v->arch.privregs, 0, 0, 0, 0, 0, 0);
 
        /* Need to save KR when domain switch, though HV itself doesn;t
         * use them.
@@ -332,17 +329,12 @@ void
 void
 vmx_load_state(struct vcpu *v)
 {
-       u64 status;
-
        BUG_ON(v != current);
 
        vmx_load_all_rr(v);
 
        /* vmx_load_all_rr() pins down v->arch.privregs with both dtr/itr*/
-       status = ia64_pal_vp_restore((u64 *)v->arch.privregs, 0);
-       if (status != PAL_STATUS_SUCCESS){
-               panic_domain(vcpu_regs(v),"Restore vp status failed\n");
-       }
+       ia64_call_vsa(PAL_VPS_RESTORE, v->arch.privregs, 0, 0, 0, 0, 0, 0);
 
        ia64_set_kr(0, v->arch.arch_vmx.vkr[0]);
        ia64_set_kr(1, v->arch.arch_vmx.vkr[1]);
diff -r e6d6595d29f7 -r b45f3a99a4bb xen/include/asm-ia64/vmx_pal_vsa.h
--- a/xen/include/asm-ia64/vmx_pal_vsa.h        Mon Mar 10 11:27:42 2008 -0600
+++ b/xen/include/asm-ia64/vmx_pal_vsa.h        Mon Mar 10 11:50:59 2008 -0600
@@ -38,6 +38,8 @@ extern u64 __vsa_base;
 #define PAL_VPS_SET_PENDING_INTERRUPT       0x1000
 #define PAL_VPS_THASH               0x1400
 #define PAL_VPS_TTAG                0x1800
+#define PAL_VPS_RESTORE             0x1c00
+#define PAL_VPS_SAVE                0x2000
 
 #endif /* _PAL_VSA_H_ */
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.