WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

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

To: <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH]Guarantee VTi guest can get correct frequency base
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>