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

(Sorry about the slight delay responding; I've been travelling, and
away from my usual dev machine.)

> > > Windows makes internal 'debugprint' calls, kind of like the kernel
> > > logging that Linux does that you get via dmesg.
> > >
> > > It would make my life a heap easier if I could route those to dom0.
> The
> > > windows debugger allows this indirectly but it is really slow and
> has
> > > heaps of overhead.
> > >
> > > Is it possible to use the /local/domain/<id>/drivers/console/0 to do
> > > this? It looks like even PV linux doesn't use this, so maybe it's
> just a
> > > legacy thing?
> > If you boot your hypervisor with guest_loglvl=all on the command line
> > then you should be able to log to Xen's ring buffer by outb'ing bytes
> > to port 0xe9.  The results will show up in xm dmesg and the hypervisor
> > serial console.
> > 
> > I'm not sure what version of Xen you're running, but some of the older
> > ones had problems with rep outsb to that port, so you might be better
> > off using a bunch of individual outb's.
> That's interesting... so that is implemented by the hypervisor then?
Yes.

> 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've checked that this applies against qemu-xen-unstable.git, and that
the resulting tree at least builds, but I've not actually checked that
it works.  Upstream qemu is pretty similar to XenServer qemu at the
moment, though, so it should be okay.

> Currently, 'xm save' appears to work but after 'xm restore' the DomU is
> hanging at some really strange points (eg between one KdPrint statement
> and the next), so I suspect that something else is going on but I'm
> never getting the debug output because it's crashed so hard that even
> the windows debugger can't talk to me anymore. At least if I was doing
> outb's the logging would be done synchronously and I wouldn't have the
> debugger connected which I think is introducing a heisenbug effect...
Can't help you with that, sorry.

Steven.

Attachment: qemu-syslog.diff
Description: Text Data

Attachment: signature.asc
Description: Digital signature

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