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

[Xen-ia64-devel] [PATCH]Guarantee VTi guest can get correct frequency base


  • To: <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
  • Date: Mon, 6 Mar 2006 16:19:40 +0800
  • Delivery-date: Mon, 06 Mar 2006 08:20:13 +0000
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AcZA9rbksfWbxx2zRKKTskOlFfq62A==
  • Thread-topic: [PATCH]Guarantee VTi guest can get correct frequency base

Because some platforms don't implement pal_freq_base call in PAL, in
this 
case, call host SAL sal_freq_base instead to get correct freqency base
value.

diff -r 5e751dddf4d0 xen/arch/ia64/vmx/pal_emul.c
--- a/xen/arch/ia64/vmx/pal_emul.c      Tue Feb 28 17:24:03 2006
+++ b/xen/arch/ia64/vmx/pal_emul.c      Mon Mar  6 15:16:20 2006
@@ -20,6 +20,7 @@
 
 #include <asm/vmx_vcpu.h>
 #include <asm/pal.h>
+#include <asm/sal.h>
 
 static void
 get_pal_parameters (VCPU *vcpu, UINT64 *gr29,
@@ -182,8 +183,18 @@
 static struct ia64_pal_retval
 pal_freq_base(VCPU *vcpu){
     struct ia64_pal_retval result;
+    struct ia64_sal_retval isrv;
 
     PAL_CALL(result,PAL_FREQ_BASE, 0, 0, 0);+    if(result.v0 == 0){
//PAL_FREQ_BASE may not be implemented in some platforms, call SAL
instead.
+        SAL_CALL(isrv, SAL_FREQ_BASE, 
+                SAL_FREQ_BASE_PLATFORM, 0, 0, 0, 0, 0, 0);
+        result.status = isrv.status;
+        result.v0 = isrv.v0;
+        result.v1 = result.v2 =0;
+    }
     return result;
 }
Thanks  
     Xiantao
CSD-OTC PRC Virtualization 
Intel (China) Limited 

Attachment: ensure_freq_base.patch
Description: ensure_freq_base.patch

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

 


Rackspace

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