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] Re: [PATCH] avoid injection of missed timer interrupts while

To: "Kamble, Nitin A" <nitin.a.kamble@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] avoid injection of missed timer interrupts while debugging a guest
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 19 Apr 2006 22:30:33 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 19 Apr 2006 14:34:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E305A4AFB7947540BC487567B5449BA80A3783A2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <E305A4AFB7947540BC487567B5449BA80A3783A2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 19 Apr 2006, at 22:28, Kamble, Nitin A wrote:

Gdbserver does use the xc_ptrace(PTRACE_ATTACH), and the PTRACE_ATTACH uses xc_domain_pause() to pause the running guest for debugging.
  This is the same interface called by "xm pause".
One more thing, the PIT missed timer ticks injection code is invoked later after the domain is un-paused, so at the time of that invocation the domain is no more paused. I think what you are saying can be achieved by keeping a flag that will tell the PIT code that the domain was paused & unpaused and so if you have missed ticks do not try to inject it. Did I understand you correctly, and do you think the "domain_was_paused" flag is the right solution?

Yes, you've got it. It is rather a pain as you note -- you essentially want a notifier on pause so the hvm code can maintain this flag that you can check-and-clear the next time you try to account missed ticks. On the other hand, a check for debugger mode is a bit gross and bizarre in the guts of HVM timer handling code. :-) I would at least like to see a patch that tries the more general approach and then we can pick between them.

There is also the question of whether or not we do generally want to account missed ticks if a domain is paused for some reason. But I'm pretty sure the answer is 'no'.

 -- Keir


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

<Prev in Thread] Current Thread [Next in Thread>