All of lore.kernel.org
 help / color / mirror / Atom feed
* Help debugging domain builder, qemu upstream and hvmloader
@ 2011-07-27  3:53 Daniel Castro
  2011-07-27  7:15 ` Keir Fraser
  2011-07-27  7:44 ` Wei Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Castro @ 2011-07-27  3:53 UTC (permalink / raw)
  To: xen-devel

Hello All,

I run into this problem when I modify seabios.
(XEN) hvm.c:1131:d13 Triple fault on VCPU 0 - invoking HVM system reset.

Since there is no fault handlers in the early stages of guest boot I
am in the need to debug the domain builder, upstream qemu and/or
hvmloader to see where exactly the fault is being generated.

I have no experience on debugging and this seems like a good time to start.

Any pointers, or guides anyone can provide me will be of great help.
After this I will document the process for later uses.

PD: Xen is compiled with debugging on, so is qemu and seabios.

Thanks,

Daniel

-- 
+-=====---------------------------+
| +---------------------------------+ | This space intentionally blank
for notetaking.
| |   | Daniel Castro,                |
| |   | Consultant/Programmer.|
| |   | U Andes                         |
+-------------------------------------+

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help debugging domain builder, qemu upstream and hvmloader
  2011-07-27  3:53 Help debugging domain builder, qemu upstream and hvmloader Daniel Castro
@ 2011-07-27  7:15 ` Keir Fraser
  2011-07-27  7:44 ` Wei Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2011-07-27  7:15 UTC (permalink / raw)
  To: Daniel Castro, xen-devel

On 27/07/2011 04:53, "Daniel Castro" <evil.dani@gmail.com> wrote:

> Hello All,
> 
> I run into this problem when I modify seabios.
> (XEN) hvm.c:1131:d13 Triple fault on VCPU 0 - invoking HVM system reset.
> 
> Since there is no fault handlers in the early stages of guest boot I
> am in the need to debug the domain builder, upstream qemu and/or
> hvmloader to see where exactly the fault is being generated.

You can put 'on_reboot = preserve' in your domain config file so that the
crashed domain is not automatically destroyed and restarted. Then you can
use the tool xenctx to grab the register state including crashing EIP value.

 -- Keir

> I have no experience on debugging and this seems like a good time to start.
> 
> Any pointers, or guides anyone can provide me will be of great help.
> After this I will document the process for later uses.
> 
> PD: Xen is compiled with debugging on, so is qemu and seabios.
> 
> Thanks,
> 
> Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help debugging domain builder, qemu upstream and hvmloader
  2011-07-27  3:53 Help debugging domain builder, qemu upstream and hvmloader Daniel Castro
  2011-07-27  7:15 ` Keir Fraser
@ 2011-07-27  7:44 ` Wei Liu
       [not found]   ` <CAP2B858WotB2ggGqj=4uANCOrdFiZ7KfE+QsuBjm0fU9BgZ7iA@mail.gmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Wei Liu @ 2011-07-27  7:44 UTC (permalink / raw)
  To: Daniel Castro; +Cc: xen-devel

On Wed, 2011-07-27 at 12:53 +0900, Daniel Castro wrote:
> Hello All,
> 
> I run into this problem when I modify seabios.
> (XEN) hvm.c:1131:d13 Triple fault on VCPU 0 - invoking HVM system reset.
> 
> Since there is no fault handlers in the early stages of guest boot I
> am in the need to debug the domain builder, upstream qemu and/or
> hvmloader to see where exactly the fault is being generated.
> 
> I have no experience on debugging and this seems like a good time to start.

Ian Campbell once mentioned his trick to debug QEMU (following
paragraphs quoted from his email):

=====================================================================
When I have an issue with qemu I often specify the device model in my
guest configuration as a script containing:
       echo $@ > /tmp/qemu-dm
       sleep 1h

Then immediately after running "xl create" I can examine /tmp/qemu-dm
and run the qemu by hand in the foreground, or under gdb etc. (there is
a timeout in xl waiting for qemu to announce itself so you need to be
reasonably prompt...)
=====================================================================

Wei.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help debugging domain builder, qemu upstream and hvmloader
       [not found]   ` <CAP2B858WotB2ggGqj=4uANCOrdFiZ7KfE+QsuBjm0fU9BgZ7iA@mail.gmail.com>
@ 2011-07-27 10:11     ` Wei Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2011-07-27 10:11 UTC (permalink / raw)
  To: Daniel Castro; +Cc: xen-devel

Adding @xen-devel back in CC list.

On Wed, 2011-07-27 at 18:53 +0900, Daniel Castro wrote:
> > Ian Campbell once mentioned his trick to debug QEMU (following
> > paragraphs quoted from his email):
> >
> > =====================================================================
> > When I have an issue with qemu I often specify the device model in my
> > guest configuration as a script containing:
> >       echo $@ > /tmp/qemu-dm
> >       sleep 1h
> >
> > Then immediately after running "xl create" I can examine /tmp/qemu-dm
> > and run the qemu by hand in the foreground, or under gdb etc. (there is
> > a timeout in xl waiting for qemu to announce itself so you need to be
> > reasonably prompt...)
> > =====================================================================
> 
> Works perfectly, now I need to learn how to use gdb. Any good document
> comes to mind?
> 

Google helps a lot.

GDB manual is the best document I know.

Wei.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-27 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27  3:53 Help debugging domain builder, qemu upstream and hvmloader Daniel Castro
2011-07-27  7:15 ` Keir Fraser
2011-07-27  7:44 ` Wei Liu
     [not found]   ` <CAP2B858WotB2ggGqj=4uANCOrdFiZ7KfE+QsuBjm0fU9BgZ7iA@mail.gmail.com>
2011-07-27 10:11     ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.