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

RE: [Xen-devel] debug logging in windows

To: "Steven Smith" <steven.smith@xxxxxxxxxx>
Subject: RE: [Xen-devel] debug logging in windows
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Thu, 13 Nov 2008 16:54:56 +1100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 12 Nov 2008 21:55:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081113030128.GA18035@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77D0154FB11@trantor> <20081110181659.GC8252@xxxxxxxxxxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D0154FB44@trantor> <20081113030128.GA18035@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclFPG8nawy+9gREQg25GEk4k28qJQAFdV8Q
Thread-topic: [Xen-devel] debug logging in windows
> > Is there something similar implemented via hvm/qemu that can log via
hvm
> > log files? That would make life easier. If not, I'll implement it.
> There isn't at the moment, at least not in the xenbits repositories.
> There is one in the XenServer version of qemu, though.  I've attached
> the relevant patch.  If you apply this and rebuild qemu then you
> should be able to send stuff to the qemu logfile by writing bytes to
> port 0x12.  Note that this is rate limited, though, and if you hit the
> limiter the domain will be quite severely punished.

I am using 3.2.1 so it didn't apply for me, but it was more or less what
I was doing anyway, sans the limiter.

One thing I did a little differently was to implement logging on a
per-cpu basis. Eg in my DomU I write to (0x10 + (cpu & 0xf)), and in
qemu I maintain separate buffers for each CPU. This removes the need to
maintain a global lock in the DomU, which is hard in Windows when you
want to log from multiple drivers and call from any IRQL. Without
separating the buffers, I was seeing all sorts of crazy stuff when two
CPU's tried to log at the same time.

I have successfully tracked down the problem anyway I think, I was
simply declaring too much local data in a routine that ran at DIRQL (the
IRQL that hardware interrupts run at), which was (for some reason)
causing a complete hard lockup that not even the debugger could break
into...

I'm now running save+restore in a loop via a script and will see how it
goes...

James

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