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

[Xen-changelog] [PATCH] vmx-pit-reset2.patch

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [PATCH] vmx-pit-reset2.patch
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 23 Jun 2005 10:02:54 +0000
Cc: james@xxxxxxxxxxxxx
Delivery-date: Thu, 23 Jun 2005 11:05:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1740, 2005/06/23 11:02:54+01:00, arun.sharma@xxxxxxxxx

        [PATCH] vmx-pit-reset2.patch
        
        A VMX guest can reprogram the same PIT channel twice. We should not 
create
        two ac_timers to handle this case.
        
        Signed-off-by: Edwin Zhai <edwin.zhai@xxxxxxxxx>
        Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>



 vmx_intercept.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)


diff -Nru a/xen/arch/x86/vmx_intercept.c b/xen/arch/x86/vmx_intercept.c
--- a/xen/arch/x86/vmx_intercept.c      2005-06-23 07:06:24 -04:00
+++ b/xen/arch/x86/vmx_intercept.c      2005-06-23 07:06:24 -04:00
@@ -214,6 +214,14 @@
 
     /* load init count*/
     if (p->state == STATE_IORESP_HOOK) { 
+        /* set up actimer, handle re-init */
+        if ( active_ac_timer(&(vpit->pit_timer)) ) {
+            VMX_DBG_LOG(DBG_LEVEL_1, "VMX_PIT: guest reset PIT with channel 
%lx!\n", (unsigned long) ((p->u.data >> 24) & 0x3) );
+            rem_ac_timer(&(vpit->pit_timer));
+        }
+        else
+            init_ac_timer(&vpit->pit_timer, pit_timer_fn, vpit, 0);
+
         /* init count for this channel */
         vpit->init_val = (p->u.data & 0xFFFF) ; 
         /* frequency(ms) of pit */
@@ -248,9 +256,7 @@
 
         vpit->intr_bitmap = intr;
 
-        /* set up the actimer */
-        init_ac_timer(&vpit->pit_timer, pit_timer_fn, vpit, 0);
-        pit_timer_fn(vpit); /* timer seed */
+       set_ac_timer(&vpit->pit_timer, NOW() + MILLISECS(vpit->period));
 
         /*restore the state*/
         p->state = STATE_IORESP_READY;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [PATCH] vmx-pit-reset2.patch, BitKeeper Bot <=