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/
Home Products Support Community News


[Xen-changelog] Avoid flood of PIT interrupts while debugging an hvm gue

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Avoid flood of PIT interrupts while debugging an hvm guest.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 22 Apr 2006 13:10:08 +0000
Delivery-date: Sat, 22 Apr 2006 06:12:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID d0a632bea419b2b8ea2889bb57af8ae2aa13ed07
# Parent  1171e42b900fa74413c0c762fc8f58dd5b08a8c4
Avoid flood of PIT interrupts while debugging an hvm guest.

This is rebased to the new PIT code now. It has the same logic as
earlier. PIT tries to catch up the missed timer ticks by injected all
the ticks one by one so that Guest time stays close to the wall clock.
But while debugging a hvm guest if you stop the guest by debugger and
then continue, the guest sees flood of interrupts compensating the
missed ticks for the stopped time. This patch just check if the guest is
being debugged, if yes then it does not try to catch up with the missed

Signed-off-by: Nitin A Kamble <nitin.a.kamble@.intel.com>

diff -r 1171e42b900f -r d0a632bea419 xen/arch/x86/hvm/i8254.c
--- a/xen/arch/x86/hvm/i8254.c  Sat Apr 22 09:45:45 2006 +0100
+++ b/xen/arch/x86/hvm/i8254.c  Sat Apr 22 10:14:11 2006 +0100
@@ -136,6 +136,9 @@ static __inline__ s64 missed_ticks(PITCh
 static __inline__ s64 missed_ticks(PITChannelState *s, s64 current_time)
     struct hvm_time_info *hvm_time = s->hvm_time;
+    struct domain *d = (void *) s - 
+        offsetof(struct domain, arch.hvm_domain.vpit.channels[0]);
     /* ticks from current time(expected time) to NOW */ 
     int missed_ticks;
     /* current_time is expected time for next intr, check if it's true
@@ -145,7 +148,11 @@ static __inline__ s64 missed_ticks(PITCh
     if (missed_time >= 0) {
         missed_ticks = missed_time/(s_time_t)s->period + 1;
-        hvm_time->pending_intr_nr += missed_ticks;
+        if (test_bit(_DOMF_debugging, &d->domain_flags)) {
+            hvm_time->pending_intr_nr++;
+        } else {
+            hvm_time->pending_intr_nr += missed_ticks;
+        }
         s->next_transition_time = current_time + (missed_ticks ) * s->period;
     } else
         printk("HVM_PIT:missed ticks < 0 \n");

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Avoid flood of PIT interrupts while debugging an hvm guest., Xen patchbot -unstable <=