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-devel

[Xen-devel] [PATCH] vlapic: Fix one_shot argument passed to create_perio

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] vlapic: Fix one_shot argument passed to create_period_time()
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Fri, 22 Jun 2007 19:39:43 +0900
Delivery-date: Fri, 22 Jun 2007 03:38:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)
Hi,

I've found a problem that the vlapic timer never runs in one-shot mode.
This is because the one_shot argument passed to create_period_time() is
incorrect. This patch fixes the problem and enables one-shot timer
to work properly.

Regards,
-------------------
Yosuke Iwamatsu
        NEC Corporation






# HG changeset patch
# User Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
# Date 1182507980 -32400
# Node ID 924bd2238560ec01f757e1eda1897c5327e1d997
# Parent  015d9abeacfb39c73c9aa488c2def2f66ab06e2b
vlapic: Fix one_shot argument passed to create_period_time()

vlapic_lvtt_period() returns '0' in one-shot mode and '131072(1<<17)'
in periodic mode. On the contrary, to create_periodic_time(), '1' should
be passed in one-shot mode and '0' should be passed in periodic mode.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>

diff -r 015d9abeacfb -r 924bd2238560 xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Thu Jun 21 21:36:26 2007 +0100
+++ b/xen/arch/x86/hvm/vlapic.c Fri Jun 22 19:26:20 2007 +0900
@@ -660,7 +660,8 @@ static void vlapic_write(struct vcpu *v,
 
         vlapic_set_reg(vlapic, APIC_TMICT, val);
         create_periodic_time(current, &vlapic->pt, period, vlapic->pt.irq,
-                             vlapic_lvtt_period(vlapic), NULL, vlapic);
+                             (vlapic_lvtt_period(vlapic) ? 0 : 1), NULL,
+                             vlapic);
 
         HVM_DBG_LOG(DBG_LEVEL_VLAPIC,
                     "bus cycle is %uns, "
@@ -819,7 +820,7 @@ static void lapic_rearm(struct vlapic *s
 
         s->pt.irq = lvtt & APIC_VECTOR_MASK;
         create_periodic_time(vlapic_vcpu(s), &s->pt, period, s->pt.irq,
-                             vlapic_lvtt_period(s), NULL, s);
+                             (vlapic_lvtt_period(s) ? 0 : 1), NULL, s);
 
         printk("lapic_load to rearm the actimer:"
                     "bus cycle is %uns, "

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] vlapic: Fix one_shot argument passed to create_period_time(), Yosuke Iwamatsu <=