* Kernel debugging with KVM?
@ 2007-01-27 7:04 Jun Koi
[not found] ` <fdaac4d50701262304p56acbdaakb71b326fcb1c57eb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jun Koi @ 2007-01-27 7:04 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
I am investigating the possibility of debugging guest kernel with KVM.
Anybody may shed some lights into how KVM handles breakpoints?
Suppose that we put a breakpoint (0xCC opcode in x86) into guest
kernel. When the kernel hits the breakpoint, which one will handle the
event?
Looks like qemu will handle the breakpoint first, then next the guest
kernel itself have a chance to process it. Is that correct?
And is there any chance for the host (VMM) to get notified about the event?
Thank you,
Jun
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <fdaac4d50701262304p56acbdaakb71b326fcb1c57eb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Kernel debugging with KVM? [not found] ` <fdaac4d50701262304p56acbdaakb71b326fcb1c57eb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2007-01-27 8:36 ` Avi Kivity 0 siblings, 0 replies; 2+ messages in thread From: Avi Kivity @ 2007-01-27 8:36 UTC (permalink / raw) To: Jun Koi; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Jun Koi wrote: > Hi, > > I am investigating the possibility of debugging guest kernel with KVM. > Anybody may shed some lights into how KVM handles breakpoints? > > Suppose that we put a breakpoint (0xCC opcode in x86) into guest > kernel. When the kernel hits the breakpoint, which one will handle the > event? > > Looks like qemu will handle the breakpoint first, then next the guest > kernel itself have a chance to process it. Is that correct? > > And is there any chance for the host (VMM) to get notified about the event? > > kvm supports using hardware breakpoints to debug a guest. See the KVM_GUEST_DEBUG ioctl. The modified qemu shipped with kvm allows gdb to connect and debug a kvm guest. It's been a long while since I tested this, so it may or may not work. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-27 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-27 7:04 Kernel debugging with KVM? Jun Koi
[not found] ` <fdaac4d50701262304p56acbdaakb71b326fcb1c57eb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-01-27 8:36 ` Avi Kivity
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox