|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: follow-up to guest debug support patches
On Sat, Mar 12, 2005 at 10:40:02AM -0800, Kip Macy wrote:
> > patch1:
> > It seems to be missing a way to undo the foreign mappings on exit?
>
> Foreign mappings aren't automatically undone when the process exits
> and the reference count goes down? If not, that seems like a major
> problem - what if the program crashes?
They should get undone automatically, but if the domain crashes, it
might not get cleaned up until the debugging process exits -- which
might very well be what you want.
> > Not sure why he's skipping setting DONEFPUINIT, kernel mode and clearing
> > IOPL bits though.
>
> This is unchanged. If it looks weird it is an artifact of how the diff
> is generated.
> Why would I want to set DONEFPUINIT and clear IOPL more than once?
> I've probably mis-parsed the sentence.
The code tries to bring the EDF_DONEFPUINIT flag in the exec domain
structure and the ECF_I387_VALID flags in sync with the newly passed
in full execution context in sync, i.e. EDF_DONEFPUINIT needs to be
set if and only if ECF_I387_VALID is set. For IOPL, you copy the passed
in user_ctxt into the exec domain structure, the user_ctxt includes
eflags which needs to be cleared if the domain is not privileged.
> > Doesn't the change in traps.c break in-guest debugger support? It seems
> > to always pause the domain if it is in kernel, an in-guest debugger
> > which has set a breakpoint in the kernel will never get the int3. I
> > think
> > this needs some kind of flag to enable/disable this behaviour.
>
> I thought about that, but is there an In-guest kernel debugger that
> can set breakpoints? All I know of are stubs that require a serial
> port. Does NetBSD's in-kernel debugger allow one to set breakpoints
> and continue? If so I can just put the debugger option back in
> Rules.mk.
Yes, the NetBSD in-kernel debugger allows you to set breakpoints
in the kernel. The FreeBSD one should as well? I'd prefer if
it was possible to set an EDF flag on the domain from dom0 which
controls the behaviour. I guess you want the pausing behaviour all
the time such that if a domain causes a fault, it is paused and then
you can attach the debugger. Could you change it such that the
new EDF flag gets set in setdomain (if the corresponding new ECF
flags is set, very similar to the FPU/I387 flag above) and then
make it a compile time option in the domain builder in libxc?
That way we can at some later point extend the tools to let you
specify the behaviour in the config file and/or have a tool/option
to change it for a running domain. Of course, if you're brave and
highly motivated, you could also extend the tools ;-)
> OK, I'll do that. I'll pull a new tree so I can unify the patches as
> requested by Keir.
Thanks! I think this is an excellent feature to have!
christian
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|
|
|
|
|